訪客只能看到部份內容,免費 加入會員 或由臉書 Google 可以看到全部內容
#include <iostream> using namespace std; struct MyPoint { double x; double y; }; MyPoint OnStart1() { MyPoint temp; temp.x = 121.2; temp.y = 99.3; return temp; } void OnDraw() { MyPoint temp; temp = OnStart1(); cout << "X: " << temp.x << endl; cout << "Y: " << temp.y << endl; } void main() { OnDraw(); system("Pause"); }