You need to include
Code:
#include <iostream>
using namespace std;
int main(void)
{
cout<<"Welcome to C++";
cout<<"All the best";
cout<< endl;
return 0;
}
There's several fixes I did there...
1.) I included iostream not stdio. << is part of the iostream header. It's also a part of the std namespace, so I included a using statment. Otherwise, every time I referenced cout I'd have to use std::cout it's much shorter to write the using statement.
2.) the main method now returns a value (int) and it tells the compiler that there are no arguments (void). It's mainly just good programming practice, it's not necesarry though.
3.) I included a call to endl which flushes the output buffer. Again, it's just good practice to flush the output buffer when you're done writing. That way you make sure all changes get made.
4.) I returned a value (of type int). I returned 0 which lets the operating system know that there was no errors during execution.
Hope that helps.
EDIT: also, if your book is teaching you put the .h at the end of your include statments, then chances are that your book is a bit outdated. It's not standard to do that anymore, you should leave it off.