Type: Posts; User: couling
Search took 0.02 seconds.
November 15th, 2010, 07:27 AM
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.
Also Java 1.5...
November 15th, 2010, 07:15 AM
Yes that's pretty much confirmed what I thought.
I'm building a program with a plug-in architecture. Based on a configuration it will load objects of various classes named in a config file. ...
November 12th, 2010, 10:50 AM
I think I already know the answer to this is "it can't be done" but I need to ask first before giving up and trying something different.
I've got some code which I'm writing with generics. ...
November 12th, 2010, 10:30 AM
I can't give a good answer to 1 but I can answer 2 for you a little.
Simply being related to threading does not mean that the concept fits well into the thread class. For one thing, how would...
November 28th, 2009, 12:01 PM
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.
I only mentioned the second method...
November 28th, 2009, 07:45 AM
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...
November 17th, 2009, 11:17 AM
This discussion came up a few days ago. http://www.codeguru.com/forum/showthread.php?t=488068
The general upshot is that all types are machine dependent in size. The order of sizes is strictly...
November 16th, 2009, 03:28 PM
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...
November 16th, 2009, 06:50 AM
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.
Okay, not sure what the...
November 15th, 2009, 07:55 PM
I'm going to assume that your code is deterministic (no random numbers no threading) and should in theory be the same every time.
If its crashing some times and not others this can be caused by...
November 15th, 2009, 07:39 PM
It appears you're new to programming forums in general. Code tags and correct tabbing go a long way.
Okay the "segmentation fault" is misleading. The error text says "Stack Overflow". This is...
November 15th, 2009, 07:08 PM
It's doing this because each time round the "for" loop (checking for duplicates) it writes the number in the index its on.
So lets say the population array was set to:1,5,3 and you had the random...
November 15th, 2009, 06:44 PM
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...
November 15th, 2009, 06:13 AM
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...
November 14th, 2009, 08:27 PM
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...
November 14th, 2009, 12:34 PM
You missed my point.
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...
November 14th, 2009, 05:45 AM
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...
November 14th, 2009, 05:23 AM
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...
November 14th, 2009, 04:47 AM
As far as I can see, there's no reason for it to crash in the first place, just Borland doing something weird.
It makes sense for linking in the dll's lib file to have a difference because I found...
November 13th, 2009, 09:06 PM
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...
November 13th, 2009, 08:39 PM
A string is just a sequence of numbers. They only become charicters when you try to display them to a user.
You mentioned that you need to put these into a c++ file and you're right to realise...
November 13th, 2009, 08:18 PM
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.
November 13th, 2009, 07:29 PM
Well converting to hex isnt too hard:
Just read in 1,2,3 or 4 bytes at a time and use the itoa() function to do the conversion for you.
In terms of putting it into a c++ file, why not just quote...
November 13th, 2009, 07:15 PM
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...
November 13th, 2009, 07:02 PM
Ah I see. That raises a number of issues.
Options for libraries:
Keep the source in a folder and just add it every project
The easiest option, but it does increses build time and isn't the...
Click Here to Expand Forum to Full Width