Browse Source

Delete 'LvalueRefrence/Session1-1.cpp'

master
nasicurious 2 years ago
parent
commit
8f33d1cdf5
  1. 37
      LvalueRefrence/Session1-1.cpp

37
LvalueRefrence/Session1-1.cpp

@ -1,37 +0,0 @@
#include <iostream>
using namespace std;
class Test
{
private:
int _a;
int& _b=_a;
public:
Test()
{
_a = 5;
cout << "Normal constructor"<< endl;
}
void printValue()
{
_b=12;
cout << _a << "---" << _b<< endl;
}
void printAddress()
{
cout << &_a << "---" << &_b<< endl;
}
};
int main()
{
Test t;
t.printValue();
t.printAddress();
return 0;
}
Loading…
Cancel
Save