Advertisement
RhinoZA

Untitled

Jun 1st, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8.     cout << "Hello Youtube!\n";
  9.     //The cout << tells the compiler that we will now be outputting in
  10.     //the console. The contents between the semicolons will be what is
  11.     //outputted. The \n tells the compiler to leave the rest of the line blank.
  12.    
  13.     //Again the trailing semicolon!
  14.    
  15.     cin.get();
  16.     //Now we are telling the compiler to "pause" until it receives a key
  17.     //stroke from the user.
  18.    
  19.    
  20. }
  21.  
  22. //This is the standard new source file layout. Ill explain what each means
  23. // The #include <iostream> means that we are including the input and output
  24. // streams. The using namespace std; means that we are giving the program
  25. // permission to use the namespace which is std. Stops us from entering
  26. // std:: before all our commands. The trailing semicolon ';' is extremely
  27. // important. It shows the compiler that line of code is complete.
  28. // Ah how i love sticky fingers...
  29. // The next part, int main() is the declaration for our main function..
  30. // We will get into more detail when we do functions in a later stage.
  31.  
  32. //Now lets compile and see what happens.
  33.  
  34. //Thanks for watching. Hope that you learned something. If you did, please, like and subscribe. Check the description for the code.
  35.  
  36. //Thanks, RhinoZA/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement