Created
April 25, 2020 17:41
-
-
Save domiyanyue/8de24f023e6dcb5e1f19cf9e7197cf9f to your computer and use it in GitHub Desktop.
definition example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example definition | |
// definition of a class | |
class MyClass { | |
private: | |
int m_size; | |
public: | |
MyClass(int n) : m_size(n){} | |
~MyClass() {} | |
}; | |
// definition of a function | |
int my_function (int arg) { | |
return arg; | |
} | |
// declaration of varibales, also definition | |
int my_var; | |
int my_var2 = 5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment