Last active
May 5, 2018 08:02
-
-
Save jdumont0201/47bf986b399e805f759bf6f1e6c6531e to your computer and use it in GitHub Desktop.
Private members B
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 A{ | |
int d_val; | |
public: | |
int getVal(){ | |
return d_val; | |
} | |
void setVal(int val){ | |
d_val=val; | |
} | |
}; | |
int main(){ | |
A a=A(); | |
a.setVal(5); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment