Repository navigation
Expand file tree
/
Copy pathmain.cpp
More file actions
101 lines (76 loc) · 1.67 KB
/
Copy pathmain.cpp
File metadata and controls
101 lines (76 loc) · 1.67 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
//#include "LinkedList.h"
#include "Box.h"
using namespace std;
struct User {
int age;
string name;
User(int ageVal) : age(ageVal) {};
User(int ageVal, string name) : age(ageVal), name(name) {};
};
typedef struct TNode{
int data;
// TNode *left;
}TreeNode;
//int main() {
////
//// string s1 = "guohao";
//// cout << s1[0];
//
// TreeNode node;
// node.data=1;
// cout <<node.data;
//
// TreeNode *node2=new TreeNode();
// node2->data=2;
// cout<<node2->data;
//}
/*
int main() {
User *user1 = new User(1);
std::cout << user1->age << endl;
std::cout << user1->name<<endl;
// User user2 = User(2,"guohao");
//
// std::cout<<user2.age<<endl;
// std::cout<<user2.name;
}*/
//int main(void) {
// Box *box = new Box(1, 2, 3);
//
// cout << box->width << endl;
// LinkList* list = LinkList_Create();
//
// int i = 0;
//
// Value v1, v2, v3, v4, v5;
//
// v1.v=1, v2.v=2, v3.v=3, v4.v=4, v5.v=5;
//
// LinkList_Insert(list, (LinkListNode*)&v1, 0);
// LinkList_Insert(list, (LinkListNode*)&v2, 0);
// LinkList_Insert(list, (LinkListNode*)&v3, 0);
// LinkList_Insert(list, (LinkListNode*)&v4, 0);
// LinkList_Insert(list, (LinkListNode*)&v5, 0);
//
// Value* pV = NULL;
//
// for(i=0; i<LinkList_Length(list); i++)
// {
// pV = (Value*)LinkList_Get(list, i);
//
// printf("%d\n", pV->v);
// }
//
// while(LinkList_Length(list) > 0)
// {
// pV = (Value*)LinkList_Delete(list, LinkList_Length(list)-1);
//
// printf("%d\n", pV->v);
// }
//
// LinkList_Destroy(list);
// return 0;
//}