Nov 21 2007, 04:28 PM
Post
#1
|
|
![]() Group: Members Posts: 2,350 Joined: 30-July 06 Member No.: 10,575 |
I'm getting an error:
CODE terminate called after throwing an instance of 'std::ios_base::failure' what(): basic_ios::clear Aborted With my latest C++/SDL app. What causes this, and what can I do about it? It works fine on my laptop, but when I try to run it on my Z, I got the above error. Any help would be much appreciated. |
|
|
|
![]() |
Nov 25 2007, 09:36 AM
Post
#2
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
Just curious ...
mapp.cpp, line 147 QUOTE char Line[60]; MapIn.open("../maps/test.map"); for(int y = 0; y < 15; y++) { MapIn.getline(Line,61); Should 61 MapIn.getline(Line, 61) be 60 instead? This might be causing an overflow or write pass buffer error, which can/will cause corruption if the byte past Line[59] is code or something vital. http://www.cplusplus.com/reference/iostrea...am/getline.html Have not read the other code yet, but this could be a place to start perhaps. |
|
|
|
Capn_Fish Another C++ Issue Nov 21 2007, 04:28 PM
koan I don't know so much about exception processin... Nov 22 2007, 01:05 AM
Snappy You may also want to put it some debug output stat... Nov 22 2007, 06:36 AM
Capn_Fish I don't call clear anywhere. What other functi... Nov 22 2007, 08:06 AM
Snappy A quick look .. could it be something to do with h... Nov 22 2007, 09:20 AM
koan QUOTE(Snappy @ Nov 22 2007, 09:20 AM) A q... Nov 25 2007, 10:08 PM
Capn_Fish Sure, I'll go put some cout'd numbers in n... Nov 22 2007, 09:49 AM
koan QUOTE(Capn_Fish @ Nov 22 2007, 09:49 AM) ... Nov 23 2007, 01:26 AM
koan Hi
I decided to look at your code. I don't us... Nov 25 2007, 11:55 PM
Snappy QUOTE(Capn_Fish @ Nov 23 2007, 01:49 AM) ... Nov 25 2007, 09:19 AM
Snappy btw, if you wish, you can also include the functio... Nov 25 2007, 09:50 AM
Capn_Fish Thanks for the helpful comments! I love open-s... Nov 26 2007, 04:42 AM
koan QUOTE(Capn_Fish @ Nov 26 2007, 04:42 AM) ... Nov 27 2007, 05:12 PM![]() ![]() |
|
Lo-Fi Version | Time is now: 18th May 2013 - 08:41 AM |