SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 38 of 38
  1. #26
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers guys, I've decided to gve C++ a go, doesn't look that hard

    Umm could someone tell me f some compilers arn't as good as others? As I'm downloading an IDE from bloodshed.com called dev-C++5 which includes a compiler called mingw, but if you get the source it says you need borland 6 to compile it

  2. #27
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're definately thinking too hard I'm playing around with Bloodshed (and finding C++ pretty easy to understand knowing PHP) - just download the latest from here: http://sourceforge.net/project/showf...group_id=10639 and start coding. No problem.

  3. #28
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you explain some C++ to me then, guys? I've been programming in C++ for 6 years now, and still find it pretty hard...

    The language itself isn't so hard; there are only so many constructs. But to become an STL king, that's hard. For example, do you completely understand how this little program works?:

    PHP Code:
    #include <iostream>
    #include <string>
    #include <algorithm>

    int main(int argccharargv[])
    {
        if (
    argc == 1)
        {
            
    std::cout << "Please specify the word(s) to compute permutations for ";
            
    std::cout << "as argument(s) of the program\n";
        }
        
        for (
    int i 1argci++)
        {
            
    std::string word(argv[i]);
            
    sort(word.begin(), word.end());
            do
            {
                
    std::cout << word << std::endl;
            }
            while (
    next_permutation(word.begin(), word.end()));
        }

    Good luck with C++!

    Vincent

  4. #29
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I'm downloading it now, 1/2 an hour to wait yet though. But yeah the basics look easy knowing PHP, guess I ought to go and seek a seek out a good C++ forum know before I get too OT here

  5. #30
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind
    Could you explain some C++ to me then, guys?
    Very funny! Think I'll pass for now

    Good luck with C++!

    Vincent
    Cheers

  6. #31
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind

    The language itself isn't so hard; there are only so many constructs. But to become an STL king, that's hard. For example, do you completely understand how this little program works?
    again we don't agree ... on python i mean...

    anyway, you weren't serious about that question above are you?

  7. #32
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyway, you weren't serious about that question above are you?
    Well, yes and no.

    No, because the algorithm the program uses is clearly readable and the program is very small. Anyone who understands English can see what the program does.

    But also yes, because this program was actually the n-th result of my implementation of the algorithm... I tried out many ideas, even looked up in one of Knuth's books how to compute permutations myself, but then I found out the STL already provides all stuff necessary to get it to work. And with very little code. It's not so much understanding the result that's hard, it's getting there.

    Vincent

    BTW: I love std::vector! (a bit like PHP arrays)

  8. #33
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    haha so that's what you're getting at...

    yeah the Standard library sure is powerful... i wasn't aware it had that permutation method too in fact... and when i first read in one of the C++ books that (rightly) started with using the STL, i was amazed by the amount of functionality in there! that example of yours only proves that point

  9. #34
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Situation:
    I use PHP in 80-90% of my work,

    I need to create a simple &OR complex GUI to tie in with my web-services

    do I ... learn another language to the extent that I feel competent enough to use it in a comercial environment
    or
    just use the language that I am already very comfortable with?

    Zend2 as we know is close enough to sniff. PHP-GTK will be rebuilt with GTK2 , getting an executable happening is just a case of waiting for someone to find the time.

    what more could you want ?? OK I am still thinking with my web-dev head on, but I also do a lot of data-divining and already use PHP on client machines to help in my day to day meanderings ? & why wouldnt I ... I could install PERL or take advantage of VB thats probably already there but I dont need to, PHP is far simpler to install and achieve the things I want to do (query multiple data-sources on a LAN and unify the data etc)

    I am doing this mostly from the command line and GTK is the logical next step so I can leave my clients something to tinker with as well , and already have , no ground breaking apps (in fact in 1 case just 1 button (but a very good looking button!))& I have even used Flash instead of PHP-GTK for a very image obsessed client as the GUI, calling PHP to do the dirty work (again not much more than a button but one with a prettier picture on it).

    I use PHP via a GTK terminal on my win32 boxes and do a yaksload of stuff in PHP purely as its easier and quicker (for me) than many other options .

    I too used to think that PHP was built for, and ought to stay on the web-server but I have found time and time again that that need not be and is not the case. I think PHP-GTK was first built just to see if it could be done, it could , and then the possibilites blossomed.
    If you dont know what I mean look at PHP itself, what it was meant to be and what it has become!

    Support PHP-GTK, have a play, get frustrated, start again - its well worth it, when PHP-GTK2 hits the streets you will be glad you did.

    firepages_rant -k shutdown now()

  10. #35
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ha Ha, firepages, it's your fault anyway! I started just by playing with 'spiny' a little as it doesn't like win98 too much

    PHP-GTK is a little of a catch 22, it's not really finished, so there's no point building big aps in it yet, but if no-one supports it development will be slow.

    I decided to learn C because I thought I ought to at some point anyway, started seriously yesterday and fell in love with already

    The fact is I could probably spend an afternoon with PHP-GTK and build something pretty cool because of PHP knowledge, and I will learn it soon, I just think I'm ready for C, so why not. I've already got a better appreciation of whats going on behind the scenes in PHP and what its missing, but PHP is still closest to my heart (just don't tell her I've been cheating )

  11. #36
    SitePoint Member
    Join Date
    Jun 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by mitsubishi
    I decided to learn C because I thought I ought to at some point anyway, started seriously yesterday and fell in love with already
    I strongly suggest you learn C++ rather than C

    I'm not an extremely experienced programmer, but I would say I am competant(sp) in both C++ and PHP. I agree with much of what has been said in this thread, but I also found that most of this thread was just a bunch of people *****ing about why there language of choice is better than other peoples language of choice (Btw I do agree with voostind's points on most occasions in this thread).

    But as HarryF and Firepages have both pointed out, PHP-GTK is still in it's infancy, and I think it will become much, much better with Zend2 when it is rewritten.

    Originally posted by Firepages
    Zend2 as we know is close enough to sniff. PHP-GTK will be rebuilt with GTK2 , getting an executable happening is just a case of waiting for someone to find the time.

  12. #37
    Probably eating pie mitsubishi's Avatar
    Join Date
    Sep 2001
    Location
    England, UK
    Posts
    405
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I mean C++. Yeah I totally agree with the fact that PHP-GTK is going to improve and I will get around to it and give it my support.

  13. #38
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Zibi

    I agree with much of what has been said in this thread, but I also found that most of this thread was just a bunch of people *****ing about why there language of choice is better than other peoples language of choice (Btw I do agree with voostind's points on most occasions in this thread).
    If you agree with voostind then you wouldn't want to use PHP-GTK at all. Here is the best advice that I can give... Use what you are good at, what gets the job done, and what works.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •