So i got simple code to change all _ to space but...it doesnt work! Any1 knows why? I have no idea
所以我得到了简单的代码来将所有_改变为空间但是...它不起作用! Any1知道为什么吗?我不知道
while (fout >> array[x][y]){
if (array[x][y]=='_') array[x][y]==' ';
y++;
if (y==8) {
y=0;
x+=1;
}
}
1 个解决方案
#1
9
Take a look at this line:
看看这一行:
if (array[x][y]=='_') array[x][y]==' ';
^
You have two equal signs when you are attempting to set the new value.
当您尝试设置新值时,您有两个相同的符号。
#1
9
Take a look at this line:
看看这一行:
if (array[x][y]=='_') array[x][y]==' ';
^
You have two equal signs when you are attempting to set the new value.
当您尝试设置新值时,您有两个相同的符号。