I am getting this error whenever i am trying to compile the program.
#include<iostream>
using namespace std;
void printstars(int blanks,int starsinline);
int main()
{
int nooflines,counter,noofblanks;
cout<<"Enter the number of star lines(1 to 20) to be printed ";
cin>>nooflines;
cout<<endl;
while(nooflines<0||nooflines>20)
{
cout<<"Numbers of star lines should be between 1 and 20 "<<endl;
cout<<"Enter the number of star lines (1 to 20 ) to be printed:";
cin>>nooflines;
}
for(counter=1; counter<=nooflines; counter++)
{
printstars(nooflines,counter);
noofblanks--;
}
return 0;
}
void printsatrs(int blanks,int starsinline)
{
int count;
for(count=1;count<=blanks;count++)
count<<' ';
for (count=1;count<=starsinline; count++)
cout<<"*";
cout<<endl;
}
Also, for next time, please note that you can edit your post and add [code] {code here} [/code] tags around your code.
Also also, technically a warning is not an error; but often a warning means that part of your code will not run in the way you, the programmer, expect it to. (In this case, your code is doing a useless left shift instead of printing out what you actually wanted.)
Also, for next time, please note that you can edit your post and add {code here} tags around your code. Will you please tell me about this what is this. i am new here.