Created
December 20, 2015 09:26
-
-
Save TheOpenDevProject/5ef87ec7757f9124e21a to your computer and use it in GitHub Desktop.
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
class MyClass{ | |
//For arguments sake to fit with rust just make everything public | |
public: | |
std::string _name; | |
MyClass(std::string name){ | |
this->_name = name; | |
} | |
std::string Name(){ | |
return this->_name; | |
} | |
void AnotherMethod(){ | |
//What ever | |
} | |
} | |
main(){ | |
MyClass myObject; | |
myObject.AnotherMethod(); | |
auto x = myObject.Name(); | |
} |
Manishearth
commented
Dec 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment