Problem with stringstream

This is a discussion on Problem with stringstream within the C++ Programming forums, part of the General Programming Boards category; A buffer overrun somethere in the route you are witing a buffer that is bigger than the allocated space... or ...

  1. #16
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    A buffer overrun
    somethere in the route you are witing a buffer that is bigger than the allocated space...
    or wirting to the not-existing index of array... or something like that

    it also explains randomness of the error - it occures when you trying to read the garbage, not when you put it there...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  2. #17
    Registered User
    Join Date
    Oct 2006
    Location
    UK/Norway
    Posts
    485
    But the buffer overrun should then be in the intToString() function? As it is only when I add that I get the error.

  3. #18
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Quote Originally Posted by h3ro View Post
    But the buffer overrun should then be in the intToString() function? As it is only when I add that I get the error.
    No. It could be anywhere else... In the function where the crash occures - you just go to read the corrupted memory...

    And adding or removing part of the code just moves the corrupted block up and down along the heap or stack - causing the crash to occure in different parts of the code
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  4. #19
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    What compiler are you using? What is your warning level set to? Do you have a built-in debugger?
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stringstream to float problem
    By c0d3m0nk3y in forum C++ Programming
    Replies: 10
    Last Post: 02-01-2008, 03:07 AM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21