Search:

Type: Posts; User: cus

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,596

    man -k (how to use correctly)

    hi all, I know this isn't programming directly but will help indirectly to a program I am writing.
    I'm not sure if I am using the manual pages correctly from the terminal. From notes from a lecture...
  2. thanks all... works fine now

    thanks all... works fine now
  3. So should the second fork() not be inside the...

    So should the second fork() not be inside the else tag ?
  4. i have created another fork() inside the else...

    i have created another fork() inside the else tag, and think that I am right in saying that the code now creates a child process that in itself then creates its own child process.
    This is the code...
  5. cheers... i will try in a moment - should I use...

    cheers... i will try in a moment - should I use the int variable 'pid' or create another?
  6. create a child process that creates a child process

    Hi all I have been asked to: Write a C program that will create a child process which is a simple copy of the parent process and each should report their existence by outputting its own PID and its...
  7. Replies
    5
    Views
    6,045

    I didn't notice the space on the \n silly me -...

    I didn't notice the space on the \n silly me - Thanks for that
  8. Replies
    5
    Views
    6,045

    i have changed all the obvious spaces to this: ...

    i have changed all the obvious spaces to this:



    #include <time.h>
    #include <stdio.h>
    #include <unistd.h>

    int main( )
    {
  9. Replies
    5
    Views
    6,045

    time program showing time since epoch?

    Hi all, for a tutorial we have been given the task of demonstrating a time program that was discussed in a lecture. However when I convert from the slide to try and compile it, there are many errors...
  10. Replies
    9
    Views
    3,427

    this isn't in a funtion

    This isn't in a function - but the result is that the contents of one struct are copied into a second.

    http://cboard.cprogramming.com/showthread.php?t=110748
  11. thanks again @all

    Thanks for the indentation link Elysia- and yes i can see the difference between laserlight's code and my own - I agree its much easier to read and wont post again without it.

    Thanks
  12. I dont know - thats the point, I am fairly new to...

    I dont know - thats the point, I am fairly new to this you see.
  13. thank you tabstop for essentially answering the...

    thank you tabstop for essentially answering the question that I asked - I have no more hair to be pulled out. So all I need to know is the program does what its set out to do? Please say yes - or...
  14. I done it nontheless - it compiles with no...

    I done it nontheless - it compiles with no errors- and has no effect. Output is the same.
  15. and why?

    and why?
  16. i dont know i was recommended to do it.

    i dont know i was recommended to do it.
  17. I have tried to indent the code as best i can - ...

    I have tried to indent the code as best i can - I have even looked it up
  18. removed else

    #include <stdlib.h>
    #include <stdio.h>
    typedef struct exec_time
    {
    int execution_time;
    int process_number;
    float average_time; ...
  19. ok this is what I have now - I have simply added...

    ok this is what I have now - I have simply added return 1; and an else statement to execute the following printf for when 'exec_array' does not equal NULL. I have done this with the following code:...
  20. Ok at this moment in time if malloc fails then...

    Ok at this moment in time if malloc fails then the program will continue to execute and consequently run the following printf statement which we dont want.

    So therefore, we should make the...
  21. I dont know how to do the indentation correctly -...

    I dont know how to do the indentation correctly - but i will look it up. But what do you mean does not work if malloc intended - have I not written it as you intended?
  22. #include #include typedef...

    #include <stdlib.h>
    #include <stdio.h>
    typedef struct exec_time
    {
    int execution_time;
    int process_number;
    float average_time;
    }exec_time;

    int...
  23. thank you all.

    Thank you for your patience lazerlight - and everyone else :) - I obviously tried to over complicate things by asking the user to specify how many integers they would like to reserve, and as a result...
  24. its not supposed to do anything - other than that...

    its not supposed to do anything - other than that question i.e. set up an array of structures and then use malloc to allocate space dynamically for that structure. thats it thats all its supposed to...
  25. basically set up an array of structures and then...

    basically set up an array of structures and then use malloc to allocate space dynamically for that structure. I know i have made things difficult but - i am a beginner and trying to teach myself.
Results 1 to 25 of 66
Page 1 of 3 1 2 3