terminate called after throwing an instance of 'std::out_of_range'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orSp4n
    New Member
    • Dec 2009
    • 1

    terminate called after throwing an instance of 'std::out_of_range'

    I have a program that compiles and runs fine under Win XP.
    (using DevC++ beta 5).

    I've compiled the same program under Linux (Debian Lenny) and Mac OS X 10.5.8.
    (Using Eclipse). However when I try to run it from the command line I get this error:

    terminate called after throwing an instance of 'std::out of range' what(): basic_string::s ubstr

    When I try debugging from eclipse I get the error.
    When I try gdb from the command line the error does not occur.

    The program is part of a homework assignment (which is why at this moment I've chosen not to post any code), but this particular problem has nothing to do with the assignment.

    Could this be a problem with locale settings? Where should I look next?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You are using different compilers so that means you are using different implementations of the standard C++ library templates.

    You will need to debug the program that's crashing.

    Comment

    Working...