C和C++中的struct的不同:
(1)定义变量:
C语言中:
struct stu
{
......
};
struct stu student;
C++语言中:
struct stu
{
......
};
struct stu student;
或者 stu student;
struct stu
{
......
};
struct stu student;
struct stu
{
......
};
struct stu student;
或者 stu student;