Answer the question
In order to leave comments, you need to log in
How to fix C++ compilation error (error C4430: missing type specifier)?
An error occurs while compiling:
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\04-processinfo\toolhelp.h 87 1 04 ProcessInfo
and starting from line 87 is a piece of code that most likely contains an error:
inline CToolhelp::CreateSnapshot(DWORD dwFlags, DWORD dwProcessID) {
if (m_hSnapshot != INVALID_HANDLE_VALUE)
CloseHandle(m_hSnapshot);
if (dwFlags == 0) {
m_hSnapshot = INVALID_HANDLE_VALUE;
} else {
m_hSnapshot = CreateToolhelp32Snapshot(dwFlags, dwProcessID);
}
return(m_hSnapshot != INVALID_HANDLE_VALUE);
}
Answer the question
In order to leave comments, you need to log in
The return type of the CToolhelp::CreateSnapshot function is not set
By default, C substitutes int, C++ gives an error.
inline CToolhelp::CreateSnapshot() - implementation of the method without specifying the return type, but that's what the studio complains about.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question