Note to mods: This is a windows programming question, and belongs in that forum, not in the C++ forum.
You're barking up the wrong tree with using _T() macro or TCHAR type. Those are related to default character widths (eg allowing code to work whether built using unicode or not), not to fixing problems with number of arguments a function is called with.
MessageBox() has always accepted four arguments - at least, since the first version of the windows API that shipped with Windows 1.
However, historically, C compilers allowed usage of undeclared functions: when code calls a function that had not been declared, the compiler would assume the function accepts a variable argument list. The C++ standard made that flatly illegal. Using that feature has been consider bad practice in C for a few decades, so such things have been deprecated in recent C standards.
So, in short, the code you used "successfully" before was actually broken, and more recent compilers now detect that it is broken.
The argument your code is missing is actually the first: a pointer to a window that will own/manage the MessageBox. That pointer can be NULL (indicating no owner window), so the easiest solution would be to
Code:
MessageBox(0, "You must enter at least one character!", "Error!", MB_OK);
or (more completely)
Code:
MessageBox((HWND)NULL, "You must enter at least one character!", "Error!", MB_OK);
It is mandatory if compiling as C++ (and really good practice if compiling as C) to ensure the compiler can see a declaration of MessageBox() before the code that calls it. That can be achieved by #include <winuser.h> (which is Microsoft specific, but shouldn't cause problems, assuming you are building a windows application).