Search:

Type: Posts; User: Dr.Zoidburg

Search: Search took 0.00 seconds.

  1. Replies
    18
    Views
    58,046

    Setting a char * to null

    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?
  2. Replies
    12
    Views
    57,432

    Thanks for the lightening fast replies. I'll give...

    Thanks for the lightening fast replies. I'll give them a go now.
  3. Replies
    12
    Views
    57,432

    How to determine length of pointer array

    Hello,

    Just a quick question, already googled etc..

    If I have a pointer array lets say:



    char * fruit[] = {"apple", "pear", "orange", "grape", "banana"};
  4. Replies
    4
    Views
    4,113

    Sorted

    Sorted
  5. Replies
    4
    Views
    4,113

    Looking for FTP client tutorial

    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...
  6. Replies
    10
    Views
    1,929

    winioctl.h seems to be what I'm after for windows...

    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.
  7. Replies
    10
    Views
    1,929

    Windows but I don't mind doing it on linux if its...

    Windows but I don't mind doing it on linux if its easier.

    Cheers
  8. Replies
    10
    Views
    1,929

    Program which accesses DVD drive

    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...
  9. Replies
    8
    Views
    2,595

    I got it working with strncmp. I have one more...

    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...
  10. Replies
    8
    Views
    2,595

    Still can't get it working. I edited out the...

    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...
  11. Replies
    8
    Views
    2,595

    I've tried a load of stuff just now including...

    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...
  12. Replies
    8
    Views
    2,595

    Strcmp Question - C

    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...
  13. Replies
    7
    Views
    4,829

    Yeah, this is just stuff we've been given to...

    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...
  14. Replies
    7
    Views
    4,829

    Sorry, I should have included the TCPEchoServer...

    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...
  15. Replies
    7
    Views
    4,829

    ‘HandleTCPClient’: HandleTCPClient.c:38:...

    ‘HandleTCPClient’:
    HandleTCPClient.c:38: warning: assignment makes integer from pointer without a cast

    error: expected expression before ‘]’ token

    recv() failed or connection closed...
  16. Replies
    7
    Views
    4,829

    Server sending a message

    #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...
Results 1 to 16 of 16