-858993460 error after string input

Hello, i am writing a c++ program, i want to use a function that has a lot of cin inputs,
but after the first string input (when the input is int or double it works fine) the console closes down with an error code (-858993460), the strange thing is that the error code is shown 4 times instead of one.
Example:
[here goes the string input]
-858993460
-858993460
-858993460

-858993460

And this is an example of my code
1
2
3
4
5
6
7
8
9
void ac()
{
      string cpuName;
      cin >> cpuName;
      cout << cpuName;
      while (1)
      {
      }
}


Any suggestions?
Last edited on
Please post a minimal example that exhibits the problem as well as the output. Remember to use code tags.
> And this is an example of my code
http://www.eelis.net/iso-c++/testcase.xhtml
A testcase is said to reproduce the problem if, when we independently try to compile and run the testcase locally, we get the same compiler error (or our compiler's version of it) or erroneous program output specified in the testcase. A testcase that does not reproduce the problem is useless
Topic archived. No new replies allowed.