示例代码:
#include <iostream> using namespace std; struct Node { int x, y, z; Node(int _x, int _y, int _z) : x(_x), y(_y), z(_z) {} }; int main() { Node a(1, 2, 3); cout << a.x << " , " << a.y << " , " << a.z << endl; return 0; }