【题目】 error C2228: left of '.move' must hav e class/struct/union type#includeiostream.h class T Darray { int a[3][3]; public: T Darray(int [3][3]) { for(int i=0;i3;i++) { for(int j=0;j3;j++) { a[i][j]=x[i][j]; } } } void m ove() { int temp; ...
error C2228: left of '.mazhe' must have class/struct/union type 是C++中常见的一种类型使用错误而产生的编译报错:"'.mazhe'的左边必须是类、结构、联合体之一" , 使用点(.)或箭头(->)引用变量时,操作符左边必须是以上三种数据类型的变量才可以 针对本题:在使用结构体类型数据时,要先...
error C2228: left of '.mazhe' must have class/struct/union type 是C++中常见的一种类型使用错误而产生的编译报错:"'.mazhe'的左边必须是类、结构、联合体之一" , 使用点(.)或箭头(->)引用变量时,操作符左边必须是以上三种数据类型的变量才可以 针对本题:在使用结构体类型数据时,要先...
You will also see this error if you use incorrect syntax when using Managed Extensions. Whereas in other Visual Studio languages, you can use the dot operator to access a member of a managed class, a pointer to the object in C++ means you have to use the -> operator to access the memb...
error C2228: left of '.move' must have class/struct/union type#include<iostream.h> class TDarray { int a[3][3]; public: TDarray(int x[3][3]) { for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { a[i][j]=x[i][j]; } } } void move() { int temp; for(int h...
Compiler Error C2228 left of '.identifier' must have class/struct/union The operand to the left of the period (.) is not a class, structure, or union. The following sample generates C2228: // C2228.cpp int i; struct S { public:...
C/C++ 編譯器與建置工具錯誤與警告 BSCMAKE 錯誤與警告 命令列錯誤與警告 編譯器嚴重錯誤 編譯器錯誤 編譯器錯誤 C2000 - C3999、C7000 - C7999 編譯器錯誤 C2000 至 C2099 編譯器錯誤 C2100 至 C2199 編譯器錯誤 C2200 至 C2299 編譯器錯誤 C2200 至 C2299 編譯器錯誤 C2200 編譯器錯誤 C2201 編譯器...
下面的示例生成 C2228:// C2228.cppint i;struct S {public:int member;} s, *ps = &s;int main() {i.member = 0; // C2228 i is not a class typeps.member = 0; // C2228 ps is a pointer to a structures.member = 0; // s is a structure typeps->member ...
【题目】error C2228: left of '.move' must hav e class/struct/union type#include class T Darray {int a[3][3]; public: T Darray(int x[3][3]) { for(int i=0;i 相关知识点: 试题来源: 解析 【解析】修改main函数如下,即可编译通过void ;TD $$ a a i n ( ) \left\{ i n t ...
1、双击这一行D:\Program Files (x86)\Microsoft Visual Studio\MyProjects\dss\a.cpp(22) : error C2228: left of '.name' must have class/struct/union type 定位出错的地方,这句话的意思是说.name左边需要类、结构体或者联合 2、printf("%s%s\t%f\t",stu[i].name,stu[i].sex,stu[...