Sep 9, 2012 at 10:06am UTC
Well, I need a string that holds about 10000 characters, but cin get stuck somewhere around 4000-5000. I tried using a string, and an array of chars.
Last edited on Sep 9, 2012 at 10:07am UTC
Sep 9, 2012 at 10:18am UTC
What do you mean by "get stuck"? std::string is able to hold much bigger strings than 10000 characters.
Sep 9, 2012 at 10:22am UTC
well I just can't cin more chars. I think it's because of cin.
Sep 9, 2012 at 10:26am UTC
How do you read from std::cin? How do you add the characters to the string?
Sep 9, 2012 at 10:37am UTC
cin>>a;
What this does is that it skips any white space characters until it finds a non-white space character and appends all characters to a until it finds a white space character or EOF. So my guess is that it finds a white space character after about 4000-5000 characters, and that's why a doesn't get any bigger than that.
Last edited on Sep 9, 2012 at 10:44am UTC
Sep 9, 2012 at 10:52am UTC
I'm not going to sign up on that site only to view your input.
Sep 9, 2012 at 10:53am UTC
you can log in with google account or yahoo
Sep 9, 2012 at 10:55am UTC
Are you seriously suggesting I should give away the log in details of my google account to a site I have never seen before? I'm not that stupid.
EDIT: I see now that the log in method is probably safe but I don't want to give away my email address.
Last edited on Sep 9, 2012 at 10:59am UTC
Sep 9, 2012 at 10:59am UTC
Anyway my input doesn't have any spaces. Any other suggestions?
Sep 9, 2012 at 11:05am UTC
I have just tried using a char and appending it to a string and it doesn't work either.
Sep 9, 2012 at 11:05am UTC
Space is not the only white space character.