=0){cin>>current->data;current=current->Link;}}int main(){cout<<"请输入链表的元素(以0结束):";List<int> List;List.input();List.output();return 0;}不过修改后运行时你会发现你的程序还有别的问题,应该是指针和内存方面的,再好好调试下吧编译器错误 C2228错误消息“
error C2228: left of '.mazhe' must have class/struct/union type 是C++中常见的一种类型使用错误而产生的编译报错:"'.mazhe'的左边必须是类、结构、联合体之一" , 使用点(.)或箭头(->)引用变量时,操作符左边必须是以上三种数据类型的变量才可以 针对本题:在使用结构体类型数据时,要先...
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: int member; } s, *ps = &s; int main() { i.member = 0; // C2228 i is not a class type ps.member = 0; // ...
【题目】 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 '.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...
把input函数中 cin>>*xc.cost[i][j];修改成 cin>>xc->cost[i][j];
void push_back(myType valueIn) { myVector.push_back(valueIn); }; // insert valueIn to the end of arr. Size should increased by 1 void erase(myType target){ for (inti = 0; i < size; i++) { if (arr[i] == target) arr[i] = arr[i + 1]; if (i == size&&arr[i] =...
error C222..CRect rect;//想给这个矩形赋值Gxiang.TiRect(&rect); bool CGxiang::TiRect(CRect * rect){rect.left=0; //这里
【题目】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 ...
如下编译时出现一个错误:在error C2228:编译时有一个错误:error C2228: left of '.display' must...