Search code examples
c++messagebox

Error With MessageBox C++


I am working on my code in c++ but when I enter the code for a messagebox to display

MessageBox::Show(NMessage1);

All I get are the errors "'MessageBoxA' : is not a class or namespace name" and "'Show' : identifier not found"


Solution

  • MessageBox::Show is not a windows API, it just MessageBox or ::MesssageBox and you will need to #include <windows.h> .