Dev C++
Ive just downloaded this program. Is there anything i have to do to it for it to work. Cause every script ive tried compiling has errors. And its not my own scripts either.
It always says something is undeclared. what does this mean?
Eg. It says:
''cout'' undeclared (first use this function)
Thnx for your help
look for "include files", .
To use cout you must #include <iostream>
To use cout you must #include <iostream>
[size="2"]I like the Walrus best.
yup i have #include <iostream.h>
wierd...=(
also says no such file as iostream.h
[edited by - DroidZ on March 14, 2003 5:52:50 AM]
wierd...=(
also says no such file as iostream.h
[edited by - DroidZ on March 14, 2003 5:52:50 AM]
don''t include iostream.h, instead, include iostream (without the .h). Also, put: using namespace std after your includes. I think DevC++ will find cout even if you don''t tell the compiler to use the std namespace, but other compilers will complain.
#include <iostream>using namespace std;int main(int argc, char **argv){cout << "Hello World" << endl;return 0;}
quote: Original post by DroidZ
yup i have #include <iostream.h>
wierd...=(
also says no such file as iostream.h
[edited by - DroidZ on March 14, 2003 5:52:50 AM]
Sounds like you don''t have your include directories set correctly. Go to compiler options, and make sure that the directories under includes and libraries so that they go to the exact directory. I''ve found that sometimes when the directory address has a space in it, they devcpp.cfg file screws up and can''t include and link libs correctly.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement