C++ header file locations in Project Builder?

Andy Hughes

Registered
I am using OS X jaguar and trying to learn some C++ programming. I bought a good book and it has examples that seem to be working in Project Builder. I can compile and run some simple programs, but I am running into cases where the library functions the programs examples call don't seem to be there. For example,
#include conio.h //for getche()
causes an error because it can't find conio.h
(note that there are greater than and less than around conio.h that got eater by by this posting)
Can andyone tell me or point me to information about setting up the OS X environment or putting libraries in the right place or adding libraries and seeing if I have project builder set up right, or if I need to download some libraries? I have the developer stuff installed.
Any advice would be appreciated. The book I have I guess assumes you know about your programming environment, but I don't know where to look to see how I am configured.

-- andy
 
"conio" is a library from Borland for MS-DOS programs. Lots of functions in "conio" (if not all) are not ANSI C++ compliant neither POSIX compliant. Your book is probably made specificaly for DOS. MacOS X has everything in place for you to program in ANSI C++ and you can call POSIX functions.

So, just dump that book and get one that either teaches stardard C++ or a book oriented towards unix C++ programming. However, if you're just learning the language for the first time, don't mix things and go for the first one (ANSI C++).
 
Back
Top