Skip to content

Jaime Rios

  • About
  • Github
  • LinkedIn
  • X

MAX_PATH

HEAP corruption on PC with const char*

September 30, 2010 by jaimerios

I had a weird thing happen where if I create a TCHAR variable[MAX_PATH] and populate that using any Win32 function, then take that variable and memcpy it into a const char * that has been new’d, I get a HEAP corruption message when I call delete[] on the const char *. Now the funny thing … Read more

Categories Coding Tags C++, MAX_PATH, strcpy Leave a comment

Recent Posts

  • Package management with CMake’s CPM
  • Automate Evernote using AppleScript
  • Unit Tests and CMake
  • clang static analyzer
  • C++ std::erase and rbegin/rend

Recent Comments

  1. Connecting with C++ – Jaime Rios on Working with REST
  2. Connecting with C++ – Jaime Rios on Making a connection using Swift
  3. Jaime on Xcode 3.1, Perforce and Scripts
  4. jaimerios.com » Blog Archive » Haversine formula now on GitHub on Calculating distance between 2 points on Earth using the Haversine formula
  5. iPhone 3G: How to show locations around a fixed point? | Questions on Calculating distance between 2 points on Earth using the Haversine formula
© 2026 Jaime Rios • Built with GeneratePress