Do you mean you want infinite *'s when the user presses i, or the user types in something and then one asterisk is generated for each character.
here is the code for infite *'s (I'm writing this of the top of my head so excuse me for mistakes)
CODE
#include <iostream>
using namespace std;
int main()
{
char a;
cout << “Press i..... ";
cin << a;
if (a == "i")
{
while (a == "i") cout << "*";
}
else cout << "That wasn't i!";
return 0;
}
I'm not going to write the whole code for the one asterisk per character because I fear you use C and I use C++. However, here is code that counts the amount of characters.
CODE
#include <iostream>
using namespace std;
int main()
{
char a;
cout << “Press i..... ";
cin << a;
if (a == "i")
{
while (a == "i") cout << "*";
}
else cout << "That wasn't i!";
return 0;
}
Hope this helps.