day 009 : error C2100: illegal indirection ?

Hi guys,

Can you please tell me what I'm doing wrong here?
This code is from where Casey is starting to replace the square wave with a sine wave.

#define PI32 3.14159265359f;
...
real32 t = 2.0f*PI32*(real32)runningSampleIndex / (real32)wavePeriod;

The second line is not compiling ("error C2100: illegal indirection" and "warning C4552: '/': operator has no effect; expected operator with side-effect") unless I replace PI32 with 3.14159f.

I really have NO clue ... :S

Oh yeah : VS2015 + Win10.

Thanks.

Edited by siska on
remove the semicolon from the #define line

with it the second line gets expanded to:

1
real32 t = 2.0f*3.14159265359f;*(real32)runningSampleIndex / (real32)wavePeriod;


and after separating the statements:

1
2
real32 t = 2.0f*3.14159265359f;
*(real32)runningSampleIndex / (real32)wavePeriod;
Unbelievable !!!

You do not want to know how many hours I've spent trying to solve this bug :blush:

Thank you SO much !!!