how to include cout.fill

how to fill cout.fill in my coding ,i still cant run it even though i put it under char

#include<iostream>
using namespace std;
int main()
{
int age;
char c,r;

cin>>c;
cin>>r;
cin>>age;
if (c=='Y')
{if(r=='Y')
{if (age>=21)
cout<<"eligible to vote"<<endl;
else
cout<<"cant vote!"<<endl;
}
else
cout<<"cant't vote!!"<<endl;
}
else
cout<<"cant't vote!!!"<<endl;
}
What do you actually want to do?
Maybe this example will help: http://www.cplusplus.com/reference/ios/ios/fill/
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/220632/

@OP are you sure you're not misunderstanding this website as a homework site?
no,i was hoping explanation not answer.
I see no attempt to call cout.fill() in the code you posted.

Please show the code that is not compiling, along with the exact text of any error messages from the compiler.

i put it under char

I don't know what that means.

PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.

Topic archived. No new replies allowed.