fstream.h, conio.h and other header files in Xcode

Jul 5, 2014 at 2:13pm
Hey,

I'm a beginner in C++ programming and I use Xcode -> Command Line Tools -> C++ on my Mac at home and Turbo C++ at school. How do I download fstream.h, conio.h, and other header files onto my Mac?

Also, is there any other alternative to Xcode for C++ programming on a Mac?

Sid
Jul 5, 2014 at 2:22pm
How do I download fstream.h, conio.h, and other header files onto my Mac?

You don't. These headers will do you no good on a Mac, <fstream.h> is an outdated header for your outdated Turbo C++ compiler, and won't work with modern compilers like Xcode. All the current C++ standard headers do not have file extensions, <fstream.h> is <fstream> in modern standard compliant compilers.

Likewise <conio.h> is a DOS specific header from another age and you really shouldn't be using anything from this header. And since it is DOS specific it won't be available for your Mac.

Also, is there any other alternative to Xcode for C++ programming on a Mac?

Yes. You may want to check out this link:
http://en.wikipedia.org/wiki/List_of_Macintosh_software#Developer_tools_and_IDEs

Jul 5, 2014 at 2:24pm
With any up-to-date compiler you should use <fstream> rather than <fstream.h>.

<conio.h> is a non-standard header, originated by Microsoft I think, it's not something you would use on a Mac. ncurses is a cross-platform alternative.
http://en.wikipedia.org/wiki/Ncurses
Topic archived. No new replies allowed.