well, i am quite confused here. You mean to say you want to take input of several strings in a single character array?
infact, here you are asking for a single character everytime :
> cin >> a[i]
if you meant to count the number of characters, then you may do it using some function like strlen(), or you may put a counter along with input.
Also, the array here is certainly unstable, without '\0' null character.
Reputation Points: 57
Solved Threads: 2
Junior Poster in Training
Offline 89 posts
since Mar 2008