Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class myClass {
  4. public:
  5.     char x[10] = "elo";
  6.     void printClassX() {
  7.         std::cout << "Your class has one variable and it`s " << x << "." << std::endl;
  8.     }
  9. };
  10.  
  11.  
  12. int main() {
  13.     myClass myObj;
  14.     myObj.x = "eloelo";
  15.     myObj.printClassX();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement