Original Post
Hi,
Take a look at the following piece of code:
int Length;
TCHAR szBuffer[40];
// Warning point
strcpy(szBuffer, TEXT("Line : %d X : %d Y : %d", i, x, y));
Length = wsprintf(szBuffer, TEXT("Line : %d, X : %d, Y : %d"),i, x, y);
TextOut(hDc, x, y,
szBuffer,
Length);
The code works fine but gives a WARNING Message as under:
E:\My Documents\My Projects\Writing Text\Messages.cpp(101) : warning C4002: too many actual parameters for macro ''TEXT''
I am using Visual C++ 6.
The program works fine, but warnings can create a lot of trouble in some cases.
There is something to do with TEXT. Even if I initialize szBuffer like:
TCHAR szBuffer[40] = TEXT("Line : %d, X : %d, Y : %d", i, x, y);
Then it gives warning here.
How do I remove this warning Message?
What is wrong with it?
What are the actual parameters of TEXT?
Anny suggestions...
Thanks,
I can survive anything ... even NUKES!!!
The Lion King