Hi all:
I am stuck in the middle of my programme, wishing you may help.
I am writing a "quene" structure in C, and it will copy the content of a string received from a server and display it on the client monitor.
Codes:
typedef struct Message_from_server message_from_server
void sqInitialise()
{
struct Message_from_server
{
char *message;
message_from_server *next_message;
};
}
void sqEnqueue(const char *s)
{
Message_from_server new_message_from_server;
new_message_from_server.message=s;
new_message_from_server.next_message=
Here is where I got stuck, I do not really know what I should do once I create a new instance of Message_from_server. Ideally, the pointer *next_message should point to the next incoming message, but I do not know how to realize this concept.
Thanks