I'm trying to compile a program. The following line of code:
hfDefault = GetStockObject(DEFAULT_GUI_FONT);
produces the "[WARNING] ANSI C++ forbids implicit conversion from 'void' in assignmnent error" How do I resolve this?
This is a discussion on implicit conversion within the C++ Programming forums, part of the General Programming Boards category; I'm trying to compile a program. The following line of code: hfDefault = GetStockObject(DEFAULT_GUI_FONT); produces the "[WARNING] ANSI C++ forbids ...
I'm trying to compile a program. The following line of code:
hfDefault = GetStockObject(DEFAULT_GUI_FONT);
produces the "[WARNING] ANSI C++ forbids implicit conversion from 'void' in assignmnent error" How do I resolve this?
HFONT hfDefault = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
Thank you golfinguy4. I thought that this problem was related to a data type issue ( i.e. int, char ect.) Use of HFONT in this way is new to me, but your suggestion does resolve my problem. ...cj56