# Solved: Dev-C++--In great need of help...



## InterKnight (Oct 19, 2004)

Hello everyone.

I have been using Bloodshed Dev-C++ since college has been out, and I thought that all was well. I tested a lot of my college labs in the program, and everything worked just fine. When I tried to create my own programs, Dev-C++ doesn't recognize a lot of commands such as 'cout', 'cin', or even the inclusion of 'iostream.h'.

Is there anything that I can do about this? I really love the Dev-C++ program, but I am really unsure of how to get it to work properly.

Any help would be greatly appreciated.

Thanks in advance.

Take care.


----------



## InterKnight (Oct 19, 2004)

If it si of any help, here is the Compile Log for a simple "Hello World" program.

Here is my code:

```
#include <iostream>

int main()
{ 
    cout << "Hello World?!" << endl << endl;

    return 0;
}
```
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Documents and Settings\Administrator\Desktop\cpptest.cpp" -o "C:\Documents and Settings\Administrator\Desktop\cpptest.exe" -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include" -I"C:\Dev-Cpp\include\c++\3.4.2\backward" -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32" -I"C:\Dev-Cpp\include\c++\3.4.2" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" 
C:\Documents and Settings\Administrator\Desktop\cpptest.cpp: In function `int main()':
C:\Documents and Settings\Administrator\Desktop\cpptest.cpp:7: error: `cout' undeclared (first use this function)
C:\Documents and Settings\Administrator\Desktop\cpptest.cpp:7: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:\Documents and Settings\Administrator\Desktop\cpptest.cpp:7: error: `endl' undeclared (first use this function)

Execution terminated


----------



## AGCurry (Jun 15, 2005)

Try:

#include <iostream.h> // not "#include <iostream>"


----------



## InterKnight (Oct 19, 2004)

I've tried using both options, but unfortunately to no avail. I have also noticed that if I was to create a class, for example


```
class Number
{
     friend istream& operator >>(istream&,Number&);
     friend ostream& operator <<(ostream&,Number&);
public:
     Number(int n = 1,299) {Number = n;}
     ~Number() {}
private:
     int Number;
};
```
For some odd reason, it won't even let me overload the operators for input and output dealing with the class. I'm not sure why, but hopefully I can get it figured out.

Thanks for the input, though. Anything is greatly appreciated.

Take care.


----------



## InterKnight (Oct 19, 2004)

Just wanted to mark this as "Solved".

I knew that the problem was not the compiler itself, but just not used to reading the error reporting from post-compilation. It took awhile, but I found that (as I suspected, but could not find the means to show it) that the error was mine. Seems that a simple ampersand (&) can really throw off a program. Sorry for the trouble, everyone.

Take care.


----------

