Click to See Complete Forum and Search --> : Is Petzold's book outdated?


psasidisrcum
February 22nd, 2005, 06:47 PM
Hi all,

I've only recently started tackling learning the Win32API and am confused by a number of things.
The examples in Petzold's book were written in C, not C++ (I think he states somewhere that's because at the time of writing, most Windows programmers were still using C). Does this mean that some of the functions he uses are outdated? Like, say, string manipulation functions. Certainly the API functions did not change or did they..?
Only having learned C++ myself, I am only vaguely aware of the differences between C++ and C. I know C++ is a superset and supports OOP and so forth, but I am wondering what the differences would be in programming with the Win32API using C++ and C.
Finally, is his book still considered the "bible" or have there been better books since?

jroemer
February 23rd, 2005, 09:16 AM
hi psasidisrcum,

i am amazed that there is one who wants to go the hard way ;-)

to your questions:

- there is no need to use c++ for programming win32 api
- there are a lot of newer interfaces for c++/vb using com-interfaces
- where did you get the petzold from?
- the win32 api and the c standard library is not outdated
- i don't know better bocks, but there are a lot of more functions in win32
- i use msdn for win32 functions

ciao

johannes

psasidisrcum
February 25th, 2005, 06:53 PM
Sorry, I'm confused as to what you mean I'm going the hard way. Do you mean using the Win32API with C is a harder way of accomplishing things than using "com-interfaces" (which, by the way, i'm not too familiar with either)? Could you clarify?

YourSurrogateGod
February 25th, 2005, 07:46 PM
Sorry, I'm confused as to what you mean I'm going the hard way. Do you mean using the Win32API with C is a harder way of accomplishing things than using "com-interfaces" (which, by the way, i'm not too familiar with either)? Could you clarify?
Well, overall working with C is a pain in the neck. With C++ you get the STL classes that can make everything neater and less problematic for you. Also, OOP provides a nice abstraction and gets rid of the need for global variables (and we all know what a problem those can be at times.)