Find the answer to your Linux question:
Results 1 to 7 of 7

Thread: C++

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1


    I am taking a WINDOWS C++ class. I am going to be needing something to compile
    and test my code. I have VMware but would rather not do it that way. Does anyone know
    of perhaps an online compiler? Something like that so that from Linux I can write and test
    my stuff? Any suggestions are welcome, thanks.

  2. #2
    Just Joined!
    Join Date
    Aug 2005
    i always used the one that came with my Fedora 4. after writing my code i'd type at the command line, g++ programname.cpp -o programname

    and that seemed to work. i also used Anjuta IDE for a bit and it seemed to work alright as well

  3. #3
    Linux Engineer
    Join Date
    Jan 2005
    Chicago (USA)
    Haha! Silly proprietary OS users. Free operating systems usually come with a compiler. Enter gcc (or g++; gcc will automatically use g++ if you compile C++) SOURCE-FILE -o EXECUTABLE-NAME. If you're writing m$ visual C++ or something, that's a different story. Use a standard (ANSI C++) instead.

  4. $spacer_open
  5. #4
    Linux User benjamin20's Avatar
    Join Date
    Oct 2004
    jacksonville beach FL
    so microsoft doesnt follow the standards for there compiler either?
    nVidia G-Force 6600GT (bfg) pci-e: amd 64 2000+ (939): 1024 corsair ram: 2X 80gb seagate harddisk SATA: plextor cd/dvd-read/write cdrom SATA

  6. #5
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    Depends what you mean by standards. I find the VisStudio IDE to be an extremely useful tool. And you can write ANSI standard C++ in it; it just requires a little self-control.
    Linux user #126863 - see

  7. #6
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Quote Originally Posted by benjamin20
    so microsoft doesnt follow the standards for there compiler either?
    They don't promote standards compliant code.

    As has been said beforehand, if you keep yourself to ANSI standard C++, then you'll be able to compile/run it on Linux using gcc. I had a data structures course that was taught using C++ and the STL. Much of the code in the book only worked on MS VS (unless I edited it ). If you have to use libraries for the course, you may want to find/build a box with gcc 2.95.3...I had much luck with this and the unedited libraries that came with the book (as they were standards compliant back in the days of 2.95.3...not now).

    I'll stop rambling now...hope this helps.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  8. #7
    The main reason I say I would like something like an online compiler,
    is because I actually want more of a way to check my code to see that
    it will compiler in m$ visual c++. I know that for the most part stuff in
    this class will work cross-platform but there are a few headers missing
    from the Linux compilers.

Posting Permissions

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