Writing simple c++ in Eclipse, help please!

Discussion in 'Mac Programming' started by XheartcoreboyX, Sep 25, 2008.

  1. macrumors 6502a


    Jul 3, 2007
    So, i need to write simple c++ programs in Eclipse for a c++ college's course, i have downloaded it, but don't understand how to write in c++..

    Libraries i need are iostream.h and math.h

    and is there anything i have to keep in mind when writing the program? do i have to write using std ?

  2. macrumors 68040


    Jan 10, 2005
    Dallas, TX
    Do you have to do it in eclipse? Is that class requirement?

    If not, I would recommend, if the projects in the course are pretty small, to just use a text editor (There are a number of programmer's text editors available, both graphical and commandline), g++, and gdb. Learning that will serve you well in understanding what an IDE is doing under the hood.

    At least eclipse is cross-platform, though I didn't download the ultra version that covers all of the different languages, etc., only Java. As such, I can't give specific instructions, but this thread:

    links to this:

    Which walks you through creating a project. A managed make project will abstract the whole build process from you, which is either good or bad depending on whether or not you actually want to know how things work.

  3. macrumors 6502a

    Jan 15, 2007
    I second not doing it in Eclipse

    if you really need an IDE, use XCode, comes with every mac and you can download the most up to date version from Apple's website.
  4. macrumors 68040

    May 29, 2003
    More information would be helpful.

    The title says it all.

    First; if you are programming in C++ what is with the *.h files?

    Second; an intro to computer science course should have set you up to understand the building of a program.

    Third; While I don't see Eclipse as being that much worst than XCode i do agree with the idea that it really pays in the long run to learn to program with a simple text editor and build a program from the command line. Back to Eclipse in many ways it is a better system than XCode, XCode is very easy to get into crash-a-matic mode. Of course updating Eclipse can do that for you two.

    Fourth; we are assuming you are programming on a Mac, but it would really help if you spelt it out. Frankly, your post leaves people with the impression that you haven't even tried as there is no usable detail at all in the text.

    Fifth; everybody has already mentioned that Mac OS comes with XCode and the associated development tools.

    Finally as far as what to keep in mind when writing the program? Well you might want to consider why you are in the class in the first place.


Share This Page