Handmade Hero » Forums » Code » Header including problem
Shihao
2 posts
#11755 Header including problem
4 weeks, 1 day ago Edited by on April 25, 2017, 12:07 a.m.

Hi, I'm new to Handmade Hero. This is a very interesting project and I really enjoy coding with Casey.

However, after following 10th day, I find a thing that I don't quite understand: Why code in handmade.h or handmade.cpp can use some type defined in win32_handmade.cpp, like 'internal'? Why don't Casey put all our own defined type in 'handmade.h' so other platform-dependent code can reuse it?

Sorry for such a naive question. I just learned C++ for several months.
mmozeiko
Mārtiņš Možeiko
1313 posts
1 project
#11756 Header including problem
4 weeks, 1 day ago Edited by Mārtiņš Možeiko on April 25, 2017, 12:14 a.m.

It was changed later.
Now we have handmade_platform.h which contains common things like "internal".

Why this is a problem?
Shihao
2 posts
#11757 Header including problem
4 weeks, 1 day ago

I only followed first 10 episodes so I don't know that. Thank you!