Hi i am running Visual c++ 2008 and im writing a program that pretty much just organizes names of people and their numbers. When i run it i get this weird weird error. It says "This application has requested it to terminate it in an unusual way." Im stuck and i dont know what to do. I cant figure it out with the debugger. I am pretty sure the error is in my hyphens function. This is what it looks like
1 2 3 4 5 6 7 8 9
void Hyphens(string Numbers[], int size)
{
for(int i = 1; i < size; i++)
{
Numbers[i].insert(3, "-");
}
}
Now i know its in there because my code was working exactly how i wanted it to before i made this function. We are using the #include<string> class. Any tips please. Thanks!
hey i got it! It was in my Hyphens program. I needed to change from size to (size -1). i dont know why exactly. if you can explain that that would be helpful. Thanks!