diff options
| author | s1n <[email protected]> | 2019-08-15 19:19:50 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-08-15 19:19:50 -0700 |
| commit | 0758d4f77092c01ed2d1c9d08d52762016716749 (patch) | |
| tree | 5a5b0ea2bc30aab5a0918f1a9384cb934fb6d445 /src | |
| download | cpp-terminology-0758d4f77092c01ed2d1c9d08d52762016716749.tar.xz cpp-terminology-0758d4f77092c01ed2d1c9d08d52762016716749.zip | |
Create main.cpp
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..b3bd46e --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,39 @@ +#include <iostream> + +void noReturn() // "void" means you DON'T want anything returned from the function. +{ + + // Code +}; // Put ";" after } to signify the end of a function. + +int yesReturn() // "int" means you WANT something to be returned. +{ + + return 0; // "return 0;" basically just means "exit". +}; + +class Example // A "class" is a user-defined data structure. +{ + + // Class Access Modifiers. + public: + // Everyone can see it. + + protected: + // Package Private + can be seen by subclasses or package member. + + private: + // Like you'd think, only the class in which it is declared can see it. + + +}; + +int main() +{ + + // Initializing main functions. + noReturn(); + yesReturn(); + + system("pause"); // "Press any key to continue" function. +} |