Hmmm. I tend to find the uses of integer Semaphores are a little different to those of boolean semaphores. But yes I did neglected to be specific about which type I was referring to.
I've used the first method a fair bit while working with delphi classes as these can't be created on the stack. It never seemd the most elagent solution though.
In most of the commertial programming I've done, I rarely have uses for exceptions because of issues with interfacing them with other (non-c++) code. When I have used them I've tended to follow the...
Command line programs which wait for the enter key are just waiting for the newline charicter "\n". You should be able to simply write that charicter to the pipe.
fputc('\n', cmd_pipe);Notice the...
Light weight. :p
But seriously when you feel like that, get some sleep and start again in the morning. The longer you stay awake unable to work the more time you waste.
Most compiler suits come with a program to automatically generate .lib files from the dll (This is called "implib" under borland). With some compilers such as MinGW you can pass the Dll in as a...
Apologies for my mis information guys. Seems that using Dynamic load DLLs with borland is pretty much foo-bared up. Just I was unlucky to get ~10 tests that ran fine, the only feature obveously...
Hmm, for some reason I read it as being inline rather than as a pointer to the vtable. Not sure what I was drinking to make me see that :sick:. That kinda makes my last two posts make a lot less...
The plain C isn't a hack. Its just plain old callback functions as they existed before the days of OO. Its explicit and doesnt rely on the specific compiler to make it...
You've sort of undone your own statement there by demonstrating that not all COM programs use virtual functions. The fact that some do is a hack in the compiler. A reasonably elagent hack I'll...
Huh? Processors, When adding or subtracting should remain correct past the wrap around. They have a "carry" flag to idicate that this has happened allowing a 32bit processor to be used to add or...
Again you're making it unessarily complicated
Taken from your first post, a file just containing the following would be sufficient to build your program:
sample: p4a.c p4b.c
gcc -o sample...
Who did you copy that one off? Whoever it was your teacher will know it was copied too. Best to start your own from scratch and only put stuff in it that you understand.
C++ offers no way to enumerate members of an object in the way that a language such as Actionscript or PHP does. Such things are really limated to the scripting languages where objects are...