wheelsmanx

test example for justin

Jun 26th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. //so in C++ you can do something cool that I actually super like
  2.  
  3. class numberThingy{
  4. public:
  5. int variableToSaveTo;
  6. numberThingy(int userInput){
  7. this->variableToSaveTo = (userInput * 5);
  8. cout << variableToSaveTo << endl;
  9. }
  10. };
  11.  
  12. //so now normally I would have to do
  13. numberThingy thisThing(5);
  14.  
  15. //BUTTTTTTTTT
  16. // I found out I can do this
  17.  
  18. numberThingy(5);
Advertisement
Add Comment
Please, Sign In to add comment