Yes, bithub, that's what I need. Do you know where I can get more information about this? Or does anyone else know how to do it?
Type: Posts; User: daghenningsorbo
Yes, bithub, that's what I need. Do you know where I can get more information about this? Or does anyone else know how to do it?
Well it's really not the precompiler-stuff I'm asking for. I have that worked out.
I just wonder if I can do something like:
debug: target
gcc -Wall ...
if the Makefile...
Hello.
Is it possible somehow to specify a debug option in a Makefile. So I can run
> make debug module
The only solution I have found now is to use debug-module for every module I have.
...
Another question :)
Is it possible to call other functions within the thread-function? Will the variables in the other functions be own instances for every thread?
Thanks for the reply. I might have done the task without threads, but the assignment specifies that the application should be able to work asynchronously, hence I have to use threads.
I have now...
Just wondering...
I'm going to start a new thread each time there is a new connection on the port I'm listening no. The program runs in an eternal loop. So I can't just put the threads in a for loop...
Well, this topic became a real discussion :)
I didn't meant fork WITH shared memory. Just a bad sentence. I meant using fork and the using shared memory to gain access to memory from the different...
Hello.
I keep asking myself whether to use fork or thread in a project I'm working on. I need to share some memory between the instances too.
The situation is: I'm gonna send some messages from...
Thank you for your answer. That cleared things up for me.
Well, I'm not doing anything related to the http protocol. We are supposed to create our own application layer protocol to handle the messages. The messages sent from client to server is just raw...
Yes I have understood the meaning of ACK in a TCP packet, but in the assignment I'm gonna send a message from server, then when the message is received on the client, I'm gonna send an ACK back to...
Hello.
I have an assignment where I shall communicate with a server and send messages between client and server. The text says that when a message has been received, the server shall answer with an...
well for the simple reason that I thought I had seen an example not using ferror() and was just wondering if there was something I was missing... :)
Hey.
That was what I was looking for. I haven't used ferror before so...
But is there a way to do the same thing without ferror?
hey.
#include <stdio.h>
FILE *fp;
int main (void)
{
int x;
hey.
when I use gcc to compile my .c-files it complains about the gets library function and says that "it is dangerous and should not be used". anyone know why?
dagH
hey all. thank you for many replies.
SWGH: your answer works using an int variable, but not using a char variable
ssharish2005 and vart: your answers works just fine. thank you
dh
what I like to do is to have one user input. and if that user input is the condition used with the while loop the loop should be run else not. then when the loop is almost finished (in the end of the...
hey. when I use (ans!='d') the printf("sum\n") prints the line twice and then the getchar() function is beeing used.
#include <stdio.h>
main()
{
char ans;
ans= getchar();
...