Currently I'm going to school for a minor in comp sci. I've got a C++ class coming up and my family got me Sams Teach yourself C++. I'm stuck on the very first lesson. Its a simple Hello world app.
This one wont work it hangs on the std::cout, then i pull this one from a website to test it and this one works.
using namespace std;
std::cout << "Hello World!" << endl; std::cout << "Welcome to C++ Programming" << endl; }
Can someone please explain to me why? The book has me using MSV C++ 2010 Express. Thanks
also another thing I see in the first code is that you are missing a extra : in std::endl;.
The first way you wrote it was actually the better way to use namespaces then the usingnamespace std;, but that is for later, when beginning learning C++ you can use usingnamespace std; with no problem just try not get into the habbit of doing it because it loads a hold bunch of crap you don't need.