Skip to content

Instantly share code, notes, and snippets.

@domiyanyue
Created April 25, 2020 17:41
Show Gist options
  • Save domiyanyue/8de24f023e6dcb5e1f19cf9e7197cf9f to your computer and use it in GitHub Desktop.
Save domiyanyue/8de24f023e6dcb5e1f19cf9e7197cf9f to your computer and use it in GitHub Desktop.
definition example
// 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