The Entry Point where it all starts
/*
For Multiline Comments
White Space is ignored by the c++ compliler
Double slash // for single line comments
Name of the Source File
What do I do
My Name
*/
//Include libraries
#include <myLibrary>
// Function Definition
int main() // <- Function Header
{
// Function Body -> Put statements here
// Semicolon's terminates each statement
myStatement(); // Don't forget your semicolons, they are required
myStatement2(); // Call functions by name to use it
myStatement3(); // the () indicates a function call
//descriptive statements are helpful
}
The main functions contains code that has a series of instructions to complete a task.
Libraries contain allot of pre-made functions. You can add libraries by using the #include directive.
Function input goes in parentheses, and are are passed in. These are called parameters/arguments.
Header Files contain information about the library.
Including Header Files
<> | """" |
---|---|
C++ Standard Library | External Libraries |
Built-into C++ | has a .h extension |