1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| struct Point { int _x; int _y; Point(int x,int y) :_x(x),_y(y){cout<<"1"<<endl;} };
class A { private: int _a; public: explicit A(int a) :_a(a){}
};
void test2() { A aa(2); string s1="hjs"; vector<string> v; v.push_back("hjk");
}
void test1() {
Point p={1,2}; int brr[5]={1,2,3,4,5};
int a=1; int b={2}; int c{3}; int arr[5]{1,2,3,4}; Point k{1,2}; int * ptr=new int[5]{1,2,3}; Point* ptrd=new Point[2]{{1,1},{2,2}};
Point p1(1,2); Point p2={1,2}; Point p3{1,2};
}
|