thanks mate
Type: Posts; User: smegly
thanks mate
Hi,
does anyone know how i can check how many messages are in the message queue, i tried IPC_STAT but it gives me a constant of 2.
any help would be appreciated!!
BUGGA!!!
i found the problem - while(1) infinite loop. .
i take this out then it works ..
now the question is can i kill a process after a desired amount of time ??
If that was the problem it would be ok..
Unfortunately, My fopen is not failing as the files are created, and I am trying to write to an additional file other than the original simulation_log.
...
Missing the }'s because i did'nt copy the entire function.
Quzah, I ported the teller function to a new program and it works fine,
However porting it back, it does'nt export to the log file.
...
Thanks i'll keep it in mind.
I still cannot figure out why it won't write to my log file.
I created an additional file simulation_log_teller, but i cannot write to that either .
Is it...
I am having 2 processes write to the file.
If this is not possible then how can I get my results out to my log file. ??
ps. Sorry bout the look of code, I've been up 48 hours trying to finish...
Hi,
I have a really confusing question. I call fprintf to send some output from my program to a file in my function customer()
This fprintf statements works fine, however, when i call the same...
Hey,
I am trying to implement arguments from the command line ..
I need to pass the argument into a function . .
the problem i have is that i need the argument to be an integer ..
i only...
I solved the problem . .
I needed to clear custRef as well as buff..
so i print to the file and then clear the buffer.. works a treat now ..
On to my next problem.. Msgget and semaphores . ....
But this still does not solve the problem of my buffer..
I am still getting reminents of the old custRef on the next pass ..
ok this is my function at the moment ..
I still cannot get it to clear the buffer correctly . .
while (fgets(buff, MAX_LEN, fin) != NULL)
{
char custAction[MAX_LEN];
Hi,
is there a way to re-initilise an array to allow it to be empty again ..
this is what i have done, but my output, doesnt clear it..
for(j=0; j<MAX_LEN; j++)
{
...
Hi,
I need to split the input i receive from my file into two parts.
File looks like this
customerNo <space> typeofrequest
eg
Hi,
I'm trying to extract just the time element from time()
my code at present is.
time_t now;
char buff[MAX_LEN];
time(&now);
Hi,
I require to send an output from a unix command such as date, and store it into a file. The problem i have is that i cannot get the output from date into a char array.
Can anyone help me...
It's a third year course. .
I spose it's partly my fault, as all along we have had the option to write in either Java/C/C++ , i always opted for Java,
Now this crappy lecturer wants it in C...
Hi,
I currently trying to implement a simulation banking system as part of an
assigment. I must stress i do not want line by line code to complete this,
what i'm really after is a guide to how i...
I don't want one to wait for the other . .
I want them to work simultaniously.. testModule will eventually be the entire program, and lineRead will retrieve a customer from the customer file...
Maybe I see concurrently in a different perspective,
at present the lineRead executes and completes, before the testModule is implemented.
To help, the code for lineRead and testModule are...
Hi,
Is there a ay to get lineRead and testModule to run at the same time. I have kind of implemented the fork method. but since it goes into an if statement lineread is executed and completed...
Hi,
I'm currently trying to use fork() to allow my program to run two seperate functions at the same time. however, i am unable to make this work . .
This is a segment of my code at present.
...
Hi,
I must confess I use java alot, and am very new at C
I need to create a routine that runs periodically every Ts seconds. The routine gets a customer from a file and places it into a FIFO...