Originally Posted by
Hunter2
Code:
#include <iostream>
int main()
{
//Write "Can you C++ now?" and then go to the next line
std::cout << "Can you C++ now?" << std::endl;
//Pause the program so it doesn't close right away
char c;
std::cin.get(c);
//Quit the program
return 0;
}
Ok, Now i'm REALLY confused! :P
First of all, your code uses std::cout and many other different things than the tutorials on this website (cprogramming.com , of course) do.
For example, on their first tutorial, instead of placing std::cout and all of that other stuff, this is what it looks like:
Code:
#include <iostream.h>
int main()
{
cout<<"HEY, you, I'm alive! Oh, and Hello World!";
return 0;
}
Of course, you must add "cin.get();" before the "return 0;" to get it to show up without closing, at least I did. :P
Anyways, what is going on! SO many different ways of doing things - i'm confused out the yin-yang!