Search:

Type: Posts; User: Martin_T

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    3,145

    I just noticed that looking at the posted link....

    I just noticed that looking at the posted link. My mistake sorry! :D
  2. Replies
    15
    Views
    3,145

    Thankyou! This is what I was trying to say...

    Thankyou! This is what I was trying to say although I think maybe I was a little unclear. I am coding for big-endian but that's easily altered now I understand how this is done.

    You help is...
  3. Replies
    15
    Views
    3,145

    Thanks for the reply. I thought you had...

    Thanks for the reply.

    I thought you had misunderstood me also as I knew 400 was outside the char data limit, that was my reason for posting. Also I think you mistaken in a previous post about a...
  4. Replies
    15
    Views
    3,145

    Thanks for your reply. In the application I am...

    Thanks for your reply.

    In the application I am using it within I have to use a char array to store my data.

    The first two characters are required to hold an 'ID' field.

    So I need some way...
  5. Replies
    15
    Views
    3,145

    yes I'm familiar with the bit shift operators....

    yes I'm familiar with the bit shift operators. Will this help?

    As laserlight says it is possible to assign this way, I have this part working in a test program. I just can't operate on two bytes...
  6. Replies
    15
    Views
    3,145

    Bit manipulation across 2 bytes?

    I have read up on bit manipulation and understand it fine i.e. How to set certain bits, get certain bits, shift bits etc etc.

    However what if the bits are across two bytes? e.g.


    char a =...
  7. Replies
    1
    Views
    2,656

    Checking for server disconnect

    I understand, using sockets, how I can tell that the server has been disconnected..... is there a way the client can retry connecting for a given time automatically before giving up??
  8. Replies
    7
    Views
    4,630

    Finally got some time to do some work on this......

    Finally got some time to do some work on this... So where i'm upto.

    The client can request to register. This sends a packet to the server with a header 'R'. The server then stores the details in a...
  9. thankyou. i think your 100% correct. I dont need...

    thankyou. i think your 100% correct. I dont need the for loop do i. Il try this as soon as am back at comp. Am on phone at the minute.
  10. MK27, once again you come to my rescue. It is...

    MK27, once again you come to my rescue. It is really appreciated.

    Not sure if it's just me but the site availability seems bad tonight. Keep getting a database error returned.

    Thanks for the...
  11. It is a client/server environment. The way I have...

    It is a client/server environment. The way I have it setup is that the server is passed a whole "logon" string including username and pasword. From that I need to getUsername to check if the user...
  12. int main(void) { char user[50] =...

    int main(void)
    {
    char user[50] = "testuser@123456";
    char userTwo[50] = "jabman@999";
    printf("\n\nUser string created");
    registerUser(user);
    printf("\n\nUser registered");
    ...
  13. Replies
    8
    Views
    3,186

    I'm only starting out myself but you may get more...

    I'm only starting out myself but you may get more suggestions if you say what the error is you are experiencing
  14. Problem with passing variables between functions

    #include <stdio.h>
    #include <string.h>


    const char *seperationChar = "@";


    void getUsername(char *usernamestring)
    {
    char *c = usernamestring;
  15. Replies
    7
    Views
    4,630

    the header suggestion really helped me. I now can...

    the header suggestion really helped me. I now can sent a message from a client and the server will recognise the action required. However just wondering how to deal with the user registration...
  16. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    I'm confused. If your saying you can't use "=="...

    I'm confused. If your saying you can't use "==" for string comparison in C then we agree. I had to use strcmp to get my code to work.
  17. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    Sorry yes, I was just wanting to post what I...

    Sorry yes, I was just wanting to post what I found in case anyone was searching and came across the same problem. I have solved the issue.
  18. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    In case anyone has the same issue.

    In case anyone has the same issue.
  19. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    I did read it. However if you read my post you'd...

    I did read it. However if you read my post you'd see I said I was new to C and struggling with the concept and usage of pointers.
  20. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    Thanks for reply. However, I tried doing ...

    Thanks for reply. However,

    I tried doing


    char input = argv[1];


    and i got :
  21. Thread: C User input

    by Martin_T
    Replies
    13
    Views
    1,448

    C User input

    I'm struggling with the whole pointer concept at the moment. For example I have a piece of code for testing the first char of a command line arguement but I can't get it to work.

    I have tried...
  22. Replies
    9
    Views
    2,760

    Thanks! I've now declared them, for example : ...

    Thanks! I've now declared them, for example :


    char string[50];


    is this bad practice?
  23. Replies
    9
    Views
    2,760

    Sorry, I am quite new to C and have not quite got...

    Sorry, I am quite new to C and have not quite got to grips with the pointer stuff.

    Originally I had



    char username;
    char password;
  24. Replies
    9
    Views
    2,760

    char *username; char *password; ...

    char *username;
    char *password;




    printf("\nPlease enter your new username : ");
    scanf( "%s", username);
    printf("Please enter your password : ");
    scanf( "%s",...
  25. Replies
    9
    Views
    2,760

    Send() not "sending" whole message

    printf("\nPlease enter username : ");
    scanf( "%s", &username);
    printf("Please enter password : ");
    scanf( "%s", &password);
    send(sockfd, &username, strlen(&username), 0);...
Results 1 to 25 of 51
Page 1 of 3 1 2 3