-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
43 lines (38 loc) · 781 Bytes
/
TODO
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
TODO
//#include <iostream>
/*void func(int &a, char &c){
a=10;
c='C';
}
int main(){
int a;
char c;
func(a,c);
std::cout << "a Value: " << a << c << std::endl;
func(a,c);
std::cout << "a Value: " << a << c << std::endl;
}
*/
typedef struct{
int a;
char c;
}data_t;
void func(int &a, char &c){
a=10;
c='C';
}
int main(){
int a;
char c;
if(a=0)
c='f';
else
c='t';
data_t *d = new data_t[1];
d->a=a;
d->c=c;
func(d->a, d->c);
std::cout << "a Value: " << d->a << d->c << std::endl;
func(d->a, d->c);
std::cout << "a Value: " << d->a << d->c << std::endl;
}