xxxxxxxxxx
//typing using namespace std; before the int main will make things easier so that you
//won't need to type std:: every time you code something.
// For example:
using namespace std;
int main()
{
cout << "Hello World!";
}
xxxxxxxxxx
#include <iostream>
using namespace std;
int main() {
cout << "Text Here" << endl;
// ^^^^ used to add a new line
return 0;
// ^^^^^^^^^ this will return that the code has executed successfully
}
xxxxxxxxxx
#include <iostream> // libary, where object cout is defined
using namespace std; // in order to reduce writing std::
int main() { // entry point
cout << "Hello World"; // print
return 0; // success exit
}
xxxxxxxxxx
#include <iostream>
int main()
{
std::cout << "Hello, world!";
return 0;
}