Search:

Type: Posts; User: lukeaar

Search: Search took 0.00 seconds.

  1. Calling fdopen twice on a TCP socket file descriptor

    I am attempting to write a simple TCP server, and i want to be able to both read and write to the client.

    Can I use fdopen twice on the client file descriptor: once for read and once for write?
    ...
  2. Replies
    5
    Views
    4,873

    strtok is exactly what I was looking for, thanks!...

    strtok is exactly what I was looking for, thanks!

    What about my problem with the initial argument: the name of the program?

    It seems like such a common thing to want to find out, there must be...
  3. Replies
    5
    Views
    4,873

    No I don't think you understand. I start my...

    No I don't think you understand.

    I start my program, then my program asks for input

    This input will be a string containing a program to be run, including parameters.

    I then take this string,...
  4. Replies
    5
    Views
    4,873

    Splitting a space delimited string

    Hey forum,

    Having a little trouble here with a C program I'm writing.

    I want to take a string as input, eg:
    ./my_program -arg1 -arg2 -arg3 ... -arg 29

    and pass it into an execlp function...
  5. Replies
    3
    Views
    17,934

    Thank you very much. I just put feof after the...

    Thank you very much. I just put feof after the fgets and it works great now.

    Thanks for the help.
  6. Replies
    3
    Views
    17,934

    fgets reading the same line twice

    I have a piece of code that processes a file to get certain values out of it.
    Basically the input file is formatted like this:
    x y d
    (over multiple lines)
    x and y are positive integers and d is...
Results 1 to 6 of 6