C++ compiler error c4430 "c++ doesnt support default int"
It has nothing to do with your typedef
. The problem is that you haven't given a return type for main
:
int main()
{
// ...
}
A function must have a return type. The main
function must return int
.
You can easily look up the explanation for the error, by googling the error code. E.g. googling for 'C4430' would lead you here. The reason is, as others have stated, that you haven't declared the return type for main
function.
I don't believe you need the extra int
in the typedef, I thought from memory unsigned short (by default) is an int.