: : and it is definitely not beginner friendly! why does the windows API
: : still use C? wouldn't it be better to use c++?
:
: Using the Windows API from C++ is just fine, syntax-wise you won't
: face many problems. Just a whole lotta more typecasting all over the
: program, which is probably a good thing.
:
: But the API is built in the "C way" of doing things. This applies to
: parameter passing to functions and error handling in particular. And
: it uses some old variable naming routines called Hungarian Notation,
: which is common in C.
http://www.gregleg.com/oldHome/hungarian.html
:
: Also, knowing all the evil details in C/C++ helps a lot before
: starting with the Win API. For example, do you know about const
: correctness, how to use extern, static and volatile qualifiers,
: initialization rules of static and/or const variables, the integer
: promotion rules, the "usual aritmetic conversions",
: multi-dimensional array handling...?
:
: These are just examples, but all of the above qualify as important,
: necessary knowledge for a professional C/C++ programmer. Yet, most
: teachers and books fail to mention/explain all of them properly.
: Resulting in a huge amount of so-called professional programmers
: that don't know all of them, leading to the kind of unexpected bugs
: that they never will resolve.
:
: These are also typical things you get shot down with on job
: interviews at more serious companies.
The Hungarian Notation is one really helpful site, really interesting read! I would have to look into some of the stuff you mentioned because it was definitely not mentioned in my the book. you are right, he never even mentioned some of those.