Ok, so the first error is
Error 1 error C2146: syntax error : missing ';' before identifier 'SafeTruncateUInt64' (Handmade.cpp) e:\handmadehero\handmade.h 43 1 HandmadeHero
Here is the code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 | #if !defined(HANDMADE_H)
#if SLOW
#define Assert(Expression) if (!(Expression)) { *(int*)0 = 0; }
#else
#define Assert(Expression)
#endif
#define ArrayCount(Array) (sizeof(Array) / sizeof((Array)[0]))
#define Kilobytes(Value) ((Value)*1024)
#define Megabytes(Value) (Kilobytes(Value)*1024)
#define Gigabytes(Value) (Megabytes(Value)*1024)
#define Terabytes(Value) (Gigabytes(Value)*1024)
inline uint32
// Debug function
SafeTruncateUInt64(uint64 v)
{
Assert(v <= 0xFFFFFFFF);
return (uint32)v;
}
|
I don't find that error particularly helpful.
Edit (more info) : Following errors include:
error C2433: 'uint32' : 'inline' not permitted on data declarations
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2065: 'uint64' : undeclared identifier
error C2146: syntax error : missing ')' before identifier 'v'
These are all ridiculous error message!