CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: vector

Threaded View

  1. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: vector

    Quote Originally Posted by Rajesh1978 View Post
    The below code is giving me segment fault during delete [] (*iter) sometimes
    1) Please state the compiler and if necessary, operating system you're using (compiler name and version -- for example, don't just say g++, say g++, the version of g++ being used, and Linux as the OS).

    2) You are missing the <cstring> header, as laserlight pointed out.

    3) Other than that, the code should work correctly, unless again, std::bad_alloc() was thrown because of the call to new[].

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; April 19th, 2012 at 04:16 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured