C++ 结构体

#include <iostream>
using namespace std;

struct Node
{
    int m;
    void fun()
    {
        cout << "Hello Struct" << endl;
    }
};

int main(void)
{
    Node a;
    a.fun();

    system("pause");
    return 0;
}

 C++ 结构体是一种特殊的类

posted @ 2019-01-22 18:00  clemente  阅读(147)  评论(0编辑  收藏  举报