Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 13 of 13

Thread: C++ Compiler

  1. #1
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post

    C++ Compiler

    I'm looking to start playing around with C++, but i know absolutely nothing about the language. What would you guys suggest as a good compiler for a complete beginner? ( freeware is a must; i have no money )
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    gcc of course.

    If you don't have *nix or MacOSX, go grab Cygwin and run gcc on top of that.

    If you want to do GUI stuff, Visual Studio is really the only way to go for Windows.

  • #3
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    ...

    i don't know anything about C++, and even less about Unix. this particular route, although assuredly interesting, is probably not the best for me, just right at the moment.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #4
    New Coder
    Join Date
    May 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a couple of note:

    Borland comand line compiler:
    http://www.borland.com/products/down..._cbuilder.html

    dev c++ (is an ide as well)
    http://www.bloodshed.net/download.html

  • #5
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72 W. 48' 57" , 41 N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    thanks, i went with borland.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    paris, france
    Posts
    1,216
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i bought C++ for dummies (a very fine book) and tried compiling the same code that worked with GCC(which comes with the book) and borland free compiler. and the borland free compiler didnt work. any reasons?
    photoshop too expensive? use the GIMP! www.gimp.org

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Some compilers require:

    void main() {
    //blabla
    }

    Others require:

    int main() {
    //blabla
    return 0;
    }

    Maybe that's it?

  • #8
    New Coder
    Join Date
    Aug 2002
    Posts
    57
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I use MS VC++ compiler ... Good stuff ... but costs serious samoolies
    You can satisfy some of the people some of the time, some of the people all of the time, all of the people some of the time. But never all of the people all of the time.

  • #9
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know boring ol' C++. But I have this problem. I have Microsoft's Visual C++ and I cannot figure it out. It's too complicated. I have no understanding of Windows programming. This certainly isn't Visual Basic. Can someone point me to some kind of tutorial or something?

  • #10
    Regular Coder
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by jkd
    Some compilers require:

    void main() {
    //blabla
    }
    You should never use void main.
    the main function is defined in the ISO C standard and requires a return value. It is bad code and will result in undefind behavior. It is possible that compilers allow it and some won't even give a warning (like VC++). But that doesn't mean it is correct.
    void main is the devil . Allways use:
    Code:
    int main()
    {
    return 0;
    }

  • #11
    Regular Coder
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Fletcher
    I know boring ol' C++. But I have this problem. I have Microsoft's Visual C++ and I cannot figure it out. It's too complicated. I have no understanding of Windows programming. This certainly isn't Visual Basic. Can someone point me to some kind of tutorial or something?
    this should get you started (no offence if you know this stuff allready. If that is the case, I missunderstood you and I will die of shame

    [list=1][*]Go to File->New[*]Choose Win32 Console apllication for console programming (like DOS) or Win32 application for a windows program. This will create the Workspace (let's take the console application)[*]Give it a project name[*]choose an empty project -> Finish[*]again File->new (but the Tab will now point to FIles)[*]choose "C++ source file" and give it a name[*]you'll now have an empty text area where you can enter your code[/list=1]
    Enter the following Code: I know, you know this but there is still one catch to VC++ (in the console mode)
    Code:
    #include <stdio.h>
    
    int main()
    {
    	printf("This is my first VC++ application");
    
    	return 0;
    }
    and press F5. Now your program will compile.
    The console box will imediatly close. there are two solutions to this: ask the users for input or use system("PAUSE"); (never used this myself)
    a second solution is to press CTRL-F5 this will execute the program and you will automaticly promped to press a key before the console box shutts down

  • #12
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well... I meant I don't know how to start unraveling the GUI aspect, the MFC.

  • #13
    Regular Coder
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts
    doh,
    ::dies in shame ::

    I don't know MFC (yet) but I would start with useing the Api Functions.
    I can recomend you a good book: Programming Windows by Charles Petzold. I paid it about 70$ but it was worth it
    Also these are some good sites:
    • Sunlight Haven't used his windos tutorial, but his DirectX tut was pretty good
    • Ken Fitlike: Not realy a tutorial, but he explanes very well the use of controls like listboxes, progress bars, tree view etc. (he doesn't use MSVC++ so there are some small differences
    Last edited by maes; 09-07-2002 at 03:45 PM.


  •  

    Posting Permissions

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