aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: b3bd46ed275ffa1df2bb6e030d34eb20f6ad5e29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.
}