Last active
February 24, 2018 00:23
-
-
Save Madsy/a2f30e30600a5694b4a1d305e6e3894f to your computer and use it in GitHub Desktop.
This file contains 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 { | |
private: | |
int p_i; | |
public: | |
A(int i) : p_i(i){} | |
A(const A& a) : p_i(a.p_i){} | |
operator int(){ return p_i; } | |
}; | |
int main(){ | |
A a(1); | |
A b(a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment