Programming Tips - MFC: Debug Assertion Failed map_pp.cpp Line 159
Date: 2021nov16
Update: 2026jun17
Framework: MFC
OS: Windows
Language: C/C++
Q. MFC: Debug Assertion Failed map_pp.cpp Line 159
A. This happened to me when I had done WSAStartup() but not AfxSocketInit().
Replace WSAStartup() with AfxSocketInit() in your program.
AFX is the old name of MFC.