I'm trying to make a program that can determine how many characters there is in a text, but it outputs the same result, nomatter how long the text is.
What's wrong with it?
Code:char s1[100]; int n=0, t=0; cout << "Inset text: "; cin >> s1; while(s1[n]!='\n') { t++; n++; } cout << "You text has " << t << " characters in it";