首页 > 电脑

这个程序用来输出正方形,哪儿错了?

更新时间2018-12-02 14:11:35

#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”

代码放成一行, 让别人怎么看?故意的?

上一篇:本来是要怎么样结果由于什么原因结果又怎么样

下一篇:可以找出文档中的同音字吗?