Hello,
I have a pointer which holds a variable for example:
char * username;
strcpy(username, "ted");
How do you set the pointer so its empty and does not hold the name ted?
Type: Posts; User: Dr.Zoidburg
Hello,
I have a pointer which holds a variable for example:
char * username;
strcpy(username, "ted");
How do you set the pointer so its empty and does not hold the name ted?
Thanks for the lightening fast replies. I'll give them a go now.
Hello,
Just a quick question, already googled etc..
If I have a pointer array lets say:
char * fruit[] = {"apple", "pear", "orange", "grape", "banana"};
Sorted
Hello,
I recently created a client/server program using c. Next I'm going to have a go at making an ftp client has user login however I can't find any tutorials on the net or in books relating to...
winioctl.h seems to be what I'm after for windows although I can't find anything about it in any reference librarys or "the c programming languange" book by Brain Kernigham and Dennis Ritchie.
Windows but I don't mind doing it on linux if its easier.
Cheers
Hello,
I have to write a program for uni and part of it includes accessing the dvd drive to see whether a disc is a dvd-rom, dvd-r, dvd+r.
Could anyone give me some pointers to libraries which...
I got it working with strncmp. I have one more quick noob question though.
I want the server to validate the user input so if there is more than one character in echoString the message "message...
Still can't get it working.
I edited out the rcode. I tried it commenting the if statements and stren out and whatever I input on the client be it 1, 2, 3 I get the same response so echoBuffer...
I've tried a load of stuff just now including switch statements and I still cant get anywhere. When using the code bellow I just get an output of "Ten" so its skipping over all the other if's. I was...
Hello,
I'm trying to quickly learn C as I have a program is write in about 2 weeks using it at uni. Its client/server stuff.
To the point I can get this string compare code to work. The client...
Yeah, this is just stuff we've been given to learn how tcp/ip works using wireshark as part of of the ethical hacking part of our computer forensic course. Its not assessed work. I've been brushing...
Sorry, I should have included the TCPEchoServer and TCPEchoClient classes which deal with creating the socket.
TCPEchoServer is bellow:
#include <stdio.h> /* for printf() and...
‘HandleTCPClient’:
HandleTCPClient.c:38: warning: assignment makes integer from pointer without a cast
error: expected expression before ‘]’ token
recv() failed or connection closed...
#include <stdio.h> /* for printf() and fprintf() */
#include <sys/socket.h> /* for recv() and send() */
#include <unistd.h> /* for close() */
#define RCVBUFSIZE 32 /* Size of receive...