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

Threaded View

  1. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: C++ using Boost with unsigned char*

    Casting the result of c_str() to a char* (essentially casting away const-ness) is a bit dangerous. If you're absolutely certain that the decode() method doesn't change its argument, you should make it accept a const char*; otherwise, you need to pass a modifiable char array, which the result of c_str() is not.

    (This will change in the next standard version, but holds for now.)

    However, that probably isn't your problem here. One thing you could try is try outputting fullPath.length() in your debug statements, to catch if any whitespace characters have gotten in there somehow.
    Last edited by Lindley; July 20th, 2009 at 03:55 PM.

Tags for this Thread

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