Can't get GetModuleFileNameA to work, keep getting error 'missing type specifier...'
Posted
by
flavour404
on Stack Overflow
See other posts from Stack Overflow
or by flavour404
Published on 2010-12-24T03:44:53Z
Indexed on
2010/12/24
3:54 UTC
Read the original article
Hit count: 204
c++
|visual-studio-2008
Hi,
I am trying to use 'GetModuleFileNameA' but I keep getting the error 'c4430: missing type specifier - int assumed'. From reading the results from my google search I am guessing that it is from my use of NULL:
char Filename[MAX_PATH]; //this is a char buffer
GetModuleFileNameA(NULL, Filename, sizeof(Filename));
NULL is supposedly defined in #include stdio.h which I have included in my project, what am I doing wrong?
Thanks.
© Stack Overflow or respective owner