科目名稱:資訊系統 與網路導論 | 開課系所:資訊工程 學系 | 任課教師 |
吳坤熹 |
||
系所別: |
年級: |
學號: |
姓名: |
考試日期 |
2009.3.18 |
(考試時間: 14:10-14:30)
#include <iostream>
using std::cout;
struct Circle
{ int x, y, r;
};
struct LinkedList
{ Circle C;
LinkedList* pNext;
};
void ShowCircle(Circle c)
{
cout << "center: (" << x << "," << y << ")\t radius: "
<< r << "\n";
}
int main(void)
{
Circle C1 = {1, 2, 3};
Circle C2 = {4, 5, 6};
ShowCircle(C1);
LinkedList* p = new LinkedList;
p->C = C1;
p->pNext = new LinkedList;
p->pNext->C = C2;
ShowCircle(p->pNext->C);
}