fork download
  1. #include <iostream>
  2.  
  3. //Fact 1: Any file that ends with .cpp is considered a source file, and no other files will be compiled
  4. //Fact 2: A header file sometimes finishes with .h or no ending extension
  5. //Fact 3: The #include "stdafx.h" opener in Microsoft Visual Studio C++ express will tell the compiler to include all of the stuff in stdafx.h
  6. //Fact 4: Then the compiler will move on and include the code in <iostream>
  7. //Fact 5: So where is the iostream file? It usually comes with every C++ compiler standard
  8. //Fact 6: The < asdf > triangle brackets indicate that the compiler already knows where the file is
  9. //Fact 7: The #include " asdf " with quotes indicates that the file is local, so we're asking it to be included
  10.  
  11. using namespace std; //all of the blue words are keywords which are the foundation (the main basic words) of this programming language in c++
  12.  
  13. //there are ways to create your own keywords to do things that you instruct
  14. //(e.g.
  15.  
  16. int main()
  17. {
  18. cout << "Hello World!" ;
  19. cin.get(); //this will make the program wait for you to type something in
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Hello World!