![]() |
|
#1
|
|||
|
|||
C++ Compiling ErrorC++ Compiling Error
Hello everyone, I have compiled my first c++ program in Windows environment. (MS VC++). But I am getting error for the simple program. My program is: CPP / C++ / C Code:
Error is --------------------Configuration: first - Win32 Debug-------------------- Compiling... hello1.cpp e:\giri\c++\ex\first\hello1.cpp(4) : error C2065: 'cout' : undeclared identifier e:\giri\c++\ex\first\hello1.cpp(4) : error C2297: '<<' : illegal, right operand has type 'char [10]' e:\giri\c++\ex\first\hello1.cpp(5) : warning C4508: 'main' : function should return a value; 'void' return type assumed Error executing cl.exe. hello1.obj - 2 error(s), 1 warning(s) Anybosy can tell me what's the problem?? Last edited by LuciWiz : 09-May-2005 at 13:38.
Reason: Please include your C code between [c] & [/c] tags
|
|||
|
#2
|
|||
|
|||
|
I fixed the error. I have worked in C environment this long. So mistakenly I include <stdio.h> hearder file instead of <iostream.h>. Thanks for your try.
|
|
#3
|
|||
|
|||
|
<iostream.h> is deprecated, and shouldn't be used anymore in new programs.
Use the standard <iostream> instead. |
|
#4
|
|||
|
|||
|
In future use c++ forum and not mfc one
|
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| What is "Ambigious symbol" ??*( a compilation error) | small_ticket | C++ Forum | 2 | 07-Jan-2005 21:10 |
| Error C2146: syntax error : missing ',' before identifier 'C4' | mattchew008 | C++ Forum | 2 | 19-Dec-2004 06:06 |
| Can enum have same name as class? | crystalattice | C++ Forum | 3 | 08-Dec-2004 16:43 |
| OpenGL always reports error | mvt | OpenGL Programming | 2 | 04-Jun-2004 06:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The