C中的struct与C++中的struct的区别:
1. C中struct只能定义变量,不能定义函数;C++中的struct可以定义变量和函数;
2. struct中默认的访问权限为public;而class中默认的访问权限为private;
3. class可用于表示模板类型。