User Profile
Collapse
-
Sorry, I posted this because couldn't find the subscribe link, I thought I could delete the post (becaues the link says Edit / DELETE), but it seems as though I can't do that either. Please ignore this post, it won't happen again. -
Where do you call fork()? It looks as though the process is replaced during iteration i=1 of your for loop, and that would be why nothing else happens. You might want to fork inside the if blocks.
Code:if (j == 1) { if (fork()) exec(); } else if (j == 2) { if (fork()) exec(); } ...
Leave a comment:
-
reallocing a char** doesn't seem to do anything
Hi
I'm sure the solution to the problem I'm having is really simple, but I can't seem to see it. I'm using C, and have a char** which I'm trying to realloc to twice it's original size. I'm using the xrealloc function described in Libc's info page. However, after calling xrealloc(), the size of the array hasn't changed -- I know this because when stepping through with gdb and printing the values of the elements of the array (which is... -
-
Realtime interactive graphing of a simulation
I am writing a program to simulate a double displacement reaction getting to equilibrium, but I am having some trouble graphing the particles' concentrations. It seems that it's only possible to pan and zoom the graph once the program exits (when running it from IDLE), but I don't want to have to kill the sim every time I want to view the graph (besides, when I do, the graph window dissappears).
The following code contains all the... -
Thanks, but I was able to fix (or "work around" is probably the more correct term) the problem by switching the order of the includes in unit-dev.cpp. It's odd that that would fix it, because there are no duplicate #includes for any files relating to ThreadSafeObjec t (I know for sure, I modelled them graphically).
Thanks anyway :)Leave a comment:
-
g++ compiler error msg using templates
I'm getting a rather odd set of error messages when I try compiling the below code. I'm using the Dev-C++ IDE on WinXP, and am using a small driver program (unit-dev.cpp) to test the classes (it includes both the file listed below) The messages are:
In file included from unit-dev.cpp:27:
D:/Documents and Settings/Zachary/My Documents/School/G11/Computer Science/VirtOS/src/ipc/messagehandler. h:27: error: using-declaration...
No activity results to display
Show More
Leave a comment: