Hey y'all, I'm pretty new to Xcode and I'm having trouble with some basic programs (like "Hello World!").
Basically, I can't get this following snippet of code to work:
#include <iostream.h>
// or alternately, using #include <iostream> and then <using namespace std;> but without the angle brackets
void main () {
cout << "Hello World!" << endl;
}
The error I am getting is that iostream.h isn't found. I've done a search and it's in
/usr/include/gcc/darwin/2.95.2/g++/iostream.h
/usr/include/gcc/darwin/3.1/g++-v3/backward/iostream.h
/usr/include/gcc/darwin/3.3/c++/backward/iostream.h
/usr/include/php/Zend/zend_istdiostream.h
so why isn't it finding it? Is there some framework I need to include for it to work? What kind of target should I be making for such a simple bit of code? I've done some googling on this, and the only thing I've found was a thread on this forum saying that using namespace std was needed, though I've tried that, too. Any suggestions/tips would be helpful. Thanks!
Basically, I can't get this following snippet of code to work:
#include <iostream.h>
// or alternately, using #include <iostream> and then <using namespace std;> but without the angle brackets
void main () {
cout << "Hello World!" << endl;
}
The error I am getting is that iostream.h isn't found. I've done a search and it's in
/usr/include/gcc/darwin/2.95.2/g++/iostream.h
/usr/include/gcc/darwin/3.1/g++-v3/backward/iostream.h
/usr/include/gcc/darwin/3.3/c++/backward/iostream.h
/usr/include/php/Zend/zend_istdiostream.h
so why isn't it finding it? Is there some framework I need to include for it to work? What kind of target should I be making for such a simple bit of code? I've done some googling on this, and the only thing I've found was a thread on this forum saying that using namespace std was needed, though I've tried that, too. Any suggestions/tips would be helpful. Thanks!