Printable Version of Topic

Click here to view this topic in its original format

440 Forums _ Development _ Hello Cruel World

Posted by: lastmachine Fri 10 Jan 2003, 06:51

Howdy,
I have some controller ideas, neato stuff I promise. Problem is, I can't even compile. I have ProjectBuilder, but that's hopeless. Not the *introduction* I need. I can use gcc/g++ at the CLI, but not for C++. I can compile straight C, but no combination of #includes will get me the right headers (I think this is the problem) for compiling C++. As soon as I try to change a printf() to a cout<<, upon compile I get 'cout' unrecognized, etc...

Is this a matter of telling G++ where the headers are located? How? Other ideas?

I realize that this might be considered "too basic" for this forum, but I haven't found anywhere that would seem more appropriate, and I can't get to newsgroups from behind this miserable firewall.

I'll sure appreciate any assistance.

Hawk

Posted by: BusError Fri 10 Jan 2003, 10:04

There are many tutorials for c++ around the net; Maybe you should hunt for some that suits you!

For your particular problem, telling the compiler your source is C++ can be done two ways on the mac:
+ Name it '.cpp'
+ Compile it with 'c++' (or g++) instead of cc (aka gcc)

If it doesn't build, you are probably missing the c++ headers for cout/cin etc. And there, and I can't help you because I always refused to use those: they are just an abomination and abuse of the operators anyway.

printf() works laugh.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)