|
-
July 3rd, 2008, 08:20 AM
#5
Re: Error checking
 Originally Posted by links
I'm having trouble understanding the following piece of code:
PHP Code:
if (!RegisterClass (&wndclass))
{
MessageBox (NULL, TEXT ("This program requires Windows NT!"),
szAppName, MB_ICONERROR) ;
return 0 ;
}
If I'm correct this is C-style error checking?
Would a C++ programmer use an exception here? How would that look?
Will someone please be so kind to explain this code to me? I understand an if (x != 0) check, but I don't understand the !Function check in the code above.
Thanks in advance.
It has nothing to do with style, winprogramming goes that way,
people don't tend to write exception code since it is NOT NECESSARY IN THE "MIDDLE CLASS" CODING COMMUNITY.
There are people who might think of writing code in hard ways to make it stylish, but the more they try to decorate themselves their code, the uglier their program looks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|