In school, we used turbo c++ and we always used cout and cin to print text on the screen. But the version that i have dosent allow me to do it that way, i have to do printf. I like the cout statement better, and cin. Also when i include iostream.h it gives me 21 syntax errors. Why is that happening? is iostream.h not a header file anymore. In my class at school it was. Maybe im just not getting this. Im kinda ticked right now as you can tell. Someone please help me. I want my cout!! hah. this is how the start of my program looks
#include #inlcude #include #include void main(void)
{
cout>>"hello world.";
getch();
}
and it gives me those stupid syntax errors for iostream.h and says cout is not a defined function. HELP!
WesB
Comments
//#inlcude 1st
#include
#include
#include
void main(void)
{
// cout>>"hello world."; 2nd
cout << "hello world.";
getch();
}
3rd Rename file with .cpp extension
ie. myfile.cpp
Hope this helps.
Pappy
You learn something new everyday.