Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class myClass {
- public:
- char x[10] = "elo";
- void printClassX() {
- std::cout << "Your class has one variable and it`s " << x << "." << std::endl;
- }
- };
- int main() {
- myClass myObj;
- myObj.x = "eloelo";
- myObj.printClassX();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement