Character string input

I want to input a string whose maximum length could be pow(10,5).
And input into the string must be terminated when a newline is recognised.

How can I calculate the total number of characters entered into the string?
I am using a character string.

1
2
3
4
int k = pow(10,5);
char input[k]; //the character string.
cin.getline(input,k); // actually I want the input to stop when a newline is        //                    //recognised.
// how can I find out the number of characters entered into the string? 
Topic archived. No new replies allowed.