vector <string> inputarrayconverted = { ... };
try
{
if (atoi(inputarrayconverted[p].c_str()) >= 0)
{
inputarrayconverted[p] = "n";
}
}
catch (int e) { }`
is not working. it is giving me a "Debug Assertion Failed!" message. All I'm trying to do is verify that if the array position is an int, change its value to "n"
The error is "Debug Assertion Failed!
File: vector Expression: vector subscript out of range"
However, why is my try block not catching this? That's my question.
This is the stack trace. (I believe)
msvcp100d.dll!590599f3()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcp100d.dll]
Paradigms Assignment 2 C Plus Plus.exe!std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::operator[](unsigned int _Pos=0) Line 932 + 0x17 bytes C++
Paradigms Assignment 2 C Plus Plus.exe!wmain(int argc=1, wchar_t * * argv=0x00314af8) Line 148 + 0x12 bytes C++
Paradigms Assignment 2 C Plus Plus.exe!__tmainCRTStartup() Line 552 + 0x19 bytes C
Paradigms Assignment 2 C Plus Plus.exe!wmainCRTStartup() Line 371 C
kernel32.dll!7647339a()
ntdll.dll!77909ef2()
ntdll.dll!77909ec5()