From 0758d4f77092c01ed2d1c9d08d52762016716749 Mon Sep 17 00:00:00 2001 From: s1n Date: Thu, 15 Aug 2019 19:19:50 -0700 Subject: Create main.cpp --- src/main.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/main.cpp (limited to 'src/main.cpp') 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 + +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. +} -- cgit v1.2.3