-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
65 lines (45 loc) · 718 Bytes
/
test.cpp
File metadata and controls
65 lines (45 loc) · 718 Bytes
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
// Created by mi on 4/13/17.
//
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
struct person {
int data;
struct person *m;
};
struct SIMPLE
{
int a;
char b;
};
//声明结构体变量s1和指向结构体变量的指针s2
struct SIMPLE s1, *s2;
//给变量s1和s2的成员赋值,注意s1.a和s2->a并不是同一成员
#define __tmain main
#ifdef __tmain
#define debug cout
#else
#define debug 0 && cout
#endif // __tmain
//
//int __tmain() {
//
// person p;
// p.data = 1;
//
// std::cout << p.data;
//
//
// struct person *p1;
//// p1->data=20;
// p.m=p1;
////###################
//
// s1.a = 5;
//s1.b = 6;
////s2->a = 3;
////s2->b = 4;
//
//
//
//}