Forum: C Nov 21st, 2006 |
| Replies: 6 Views: 2,840 Aki, looked into this and I'm now using
rebruk = write(sock, files[i-1]->d_name, strlen(files[i-1]->d_name)+1);
char buf[1000]; --> That's all I have with buf, the rest is done by the... |
Forum: C Nov 21st, 2006 |
| Replies: 6 Views: 2,840 Yes, it is a char*... I tried writing 1000 instead of sizeof(buf), but I got the same result... :o/
Thank you so much for taking a look! :o) |
Forum: C Nov 21st, 2006 |
| Replies: 6 Views: 2,840 Aki, now I'm one step further, using scandir + I've written in the code for sending one filename at the time to the client, who reads in a loop.
The result from this is the server reading the... |
Forum: C Nov 18th, 2006 |
| Replies: 6 Views: 2,840 Hey!
Writing a simple client/server in C and I'm currently stuck with getting the results after calling system("ls") so I can send it from server to client.
Since system() returns an int I... |
Forum: C Oct 18th, 2006 |
| Replies: 3 Views: 3,461 *laughs* Stupid newbie error! hehe... Didn't even cross my mind as I haven't worked with doubles in C until now :oP
One more thing though, is the output correct? Is it in microseconds?
And... |
Forum: C Oct 18th, 2006 |
| Replies: 3 Views: 3,461 Helloes!
I'm using getrusage to get the usertime and systemtime, but sometimes the times returned are negative -->
SELF:
user time: 1313366639 microseconds
system time: -1547562616... |
Forum: C Oct 16th, 2006 |
| Replies: 8 Views: 1,471 Aha! Cool! Thanks again ;o) |
Forum: C Oct 16th, 2006 |
| Replies: 8 Views: 1,471 Why is adding +1 better than not having it there?
*noob who needs an explanation to everything* ;o) Hehe... |
Forum: C Oct 16th, 2006 |
| Replies: 8 Views: 1,471 I assumed I _had to_ use strcat or strcpy since I'm working with strings, but of course midl[n++] = text[i]; is the answer!
Now I can finally try to do something with these words ;o) Thank you so... |
Forum: C Oct 16th, 2006 |
| Replies: 8 Views: 1,471 Hey, and thanks for looking into this! :)
What I want it to split up a typed line into words and save them all as links to copies in the array "param". Then I'm going to use these words later...
... |
Forum: C Oct 16th, 2006 |
| Replies: 8 Views: 1,471 Hey!
I'm writing a program and currently having trouble with getting a written line typed in by the user to be copied correctly into another array...
I'm using a for-loop to run through the... |
Forum: C# Sep 19th, 2006 |
| Replies: 1 Views: 3,714 Hey!
I'm looking for some help on what I'm doing wrong as I'm new to C#. I'd really like it if you can explain why my code isn't working and then offer some help on how to fix it without "making... |