Thursday, July 9, 2009

I'm a C++ Beginner, help please???

I have visuallC++ 6.0 and I opened Win32 Console Project and wrote this code:





#include %26lt;iostream%26gt;


#include %26lt;string%26gt;


using namespace std;





int main()


{


cout %26lt;%26lt; "Hello";


return 0;


}





it says there are lot of errors. it cant find namespace std,


'cout' unknown identifier and so on.


What should I do???


I also tried C++ Builder but it had other kind of problems.


Help please Professionals.

I'm a C++ Beginner, help please???
VC++ 6.0 is very old. std:: may not be implemented in that version. You can download the most recent version of Visual C++ free here:





http://xoax.net/comp/cpp/console/Lesson0...





You will definitely need something newer, if you want to learn C++. These tutorials can get you started:





http://xoax.net/comp/cpp/console/index.p...





BTW, you may want to uninstall VC++ 6.0 before installing VC++ 2008 to avoid library clashes.
Reply:I'm puzzled.


I built your program, exactly as you posted it, using VC++ 6.0


with no error messages or other problems. So there doesn't appear to be anything wrong with your code.





You might want to add the first few lines of your error messages to your post so that we can take a look at them.
Reply:The visual C++ 6.0 is an very old compiler that doesn't use standard ISO header files. Please use a new version of Compilers. Microsoft have already launched Visual Studio 2008 C++, which ha a very good user interface. and it's express edition is free too ^.~





http://www.microsoft.com/express/vc/





Download it from there.
Reply:#include %26lt;iostream.h%26gt;


#include %26lt;string.h%26gt;





Note the ".h"





* added *


Thumbs down duly noted and appreciated.


I have VC 6 and it works with the suggestion above. It does not work as the asker wrote it.


You don't have to like it.
Reply:hey for c++ dont use visul c++.


simply use turbo c++ for the c++ language.
Reply:you get some expert help to do your project from http://expert.ccietutorial.com/


No comments:

Post a Comment