ERROR的解决方案“需要左值” [英] Solution for ERROR"lvalue required"
本文介绍了ERROR的解决方案“需要左值”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在此代码上收到错误左值错误:
i am getting a error lvalue error on this code:
gotoxy(36,12);
for(int i=0;i<8;++i) =here is where the problem comes
{
p[i]=getch();
if(p[i]==’b’)
{
printf("b b");
i=i-2;
}
else
cout<<"*";
}
p[i]=’’;
getch();
谢谢你帮助
我尝试了什么:
i不知道怎么做
所以我离开了它
thank you for help
What I have tried:
i didnt know what to do
so i left it
推荐答案
看看你的代码:你用文字处理器编辑它,而不是编辑器 - 所以你的报价不是引号,你的双引号不是双引号,而且(正如Jochen所提到的那样)''反正不是一个角色。
使用适当的编辑器 - 记事本,如果你真的很绝望,但大多数C ++系统都带有一个IDE,其中包括一个编辑器,编译器和调试器。如果你没有那么它 认真 旧,你应该考虑更新... Visual Studio包含C ++,它是免费的......
Look at your code: you edited it using a word processor, not an editor - so your quotes aren't quotes, your double quotes aren't double quotes, and (as has been mentioned by Jochen) '' isn't a character anyway.
Use a "proper" editor - Notepad if you are really desperate, but most C++ systems come with an IDE which includes a editor, compiler and debugger all in one. If yours doesn't then it's seriously old, and you ought to consider a newer one ... Visual Studio includes C++ and it's free ...
这篇关于ERROR的解决方案“需要左值”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文