Search:

Type: Posts; User: smegly

Search: Search took 0.00 seconds.

  1. thanks mate

    thanks mate
  2. checking how many messages in msg queue using msgctl commands

    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!!
  3. BUGGA!!! i found the problem - while(1)...

    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 ??
  4. If that was the problem it would be ok.. ...

    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.
    ...
  5. Missing the }'s because i did'nt copy the entire...

    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.
    ...
  6. Thanks i'll keep it in mind. I still cannot...

    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...
  7. I am having 2 processes write to the file. If...

    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...
  8. fprintf works in one function but not in the other.

    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...
  9. Replies
    3
    Views
    1,181

    arguments from a command line

    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...
  10. Replies
    10
    Views
    1,887

    I solved the problem . . I needed to clear...

    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 . ....
  11. Replies
    10
    Views
    1,887

    But this still does not solve the problem of my...

    But this still does not solve the problem of my buffer..

    I am still getting reminents of the old custRef on the next pass ..
  12. Replies
    10
    Views
    1,887

    ok this is my function at the moment .. I...

    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];
  13. Replies
    10
    Views
    1,887

    clearing a used array

    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++)
    {
    ...
  14. Replies
    6
    Views
    1,990

    splitting a string

    Hi,

    I need to split the input i receive from my file into two parts.

    File looks like this

    customerNo <space> typeofrequest

    eg
  15. Thread: Time Function

    by smegly
    Replies
    3
    Views
    3,345

    Time Function

    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);
  16. Replies
    3
    Views
    1,189

    sending output from a command to file

    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...
  17. Replies
    2
    Views
    797

    It's a third year course. . I spose it's...

    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...
  18. Replies
    2
    Views
    797

    Guideline for where to begin.

    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...
  19. Replies
    6
    Views
    1,386

    I don't want one to wait for the other . . 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...
  20. Replies
    6
    Views
    1,386

    Maybe I see concurrently in a different...

    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...
  21. Replies
    6
    Views
    1,386

    making 2 processes run simultaniously

    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...
  22. Replies
    2
    Views
    2,610

    using fork() for multitasking

    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.
    ...
  23. Replies
    4
    Views
    1,743

    Running A Routine in the background

    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...
Results 1 to 23 of 23