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?
...
Type: Posts; User: lukeaar
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?
...
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...
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,...
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...
Thank you very much. I just put feof after the fgets and it works great now.
Thanks for the help.
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...