1 |
pamelats |
1.1 |
#include "cstdlib" |
2 |
|
|
#include "iostream" |
3 |
|
|
#include "string" |
4 |
|
|
|
5 |
|
|
using std::cout; |
6 |
|
|
using std::endl; |
7 |
|
|
using std::getenv; |
8 |
|
|
using std::cin; |
9 |
|
|
using std::string; |
10 |
|
|
|
11 |
|
|
class a{ |
12 |
|
|
private: |
13 |
|
|
int s; |
14 |
|
|
int c; |
15 |
|
|
public: |
16 |
|
|
a(int t=0,int d=0) : s(t), c(d){}; |
17 |
|
|
void print() { cout <<" s,c : "<< s <<", "<< c << endl;} |
18 |
|
|
|
19 |
|
|
}; |
20 |
|
|
|
21 |
|
|
int main(){ |
22 |
|
|
string t; |
23 |
|
|
cin >> t; |
24 |
|
|
cout << "test: "<< getenv(t.c_str()) << endl; |
25 |
|
|
|
26 |
|
|
a f(123,456),b; |
27 |
|
|
f.print(); |
28 |
|
|
b.print(); |
29 |
|
|
b=f; |
30 |
|
|
b.print(); |
31 |
|
|
return 0; |
32 |
|
|
|
33 |
|
|
} |