这个程序用来输出正方形,哪儿错了?
#include<iostream>#include<string>using namespace std;void p_square(char ch,int row)//This function is used to output squares{string chs(row,ch);//This is the output of each linefor(int i;i<=row;++i)cout<<chs<<endl;}int main(){ int row; //This is the number of rows and columnschar ch;//This is the character to be outputcin>>ch>>row;p_spuare(ch,row);return 0;
}
报错:“21 20 [Error] 'p_spuare' was not declared in this scope”
代码放成一行, 让别人怎么看?故意的?
下一篇:可以找出文档中的同音字吗?
热门标签: