Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CClass
- {
- public:
- CClass( int* _piValue ) :
- m_piValue( _piValue )
- {}
- void SetValue( int* _piValue )
- {
- this->m_piValue = _piValue;
- }
- private:
- int* m_piValue;
- }
- int main()
- {
- int iValueA = 5;
- int iValueB = 6;
- CClass cls{ &iValueA };
- cls.SetValue( &iValueB );
- return ( 0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement