Search:

Type: Posts; User: anndruu12

Search: Search took 0.01 seconds.

  1. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    So it's two completely different things. For the...

    So it's two completely different things. For the test cases, I should just stick with the code you posted, and run it on both architectures.
  2. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    That makes sense, now if I can drag this one a...

    That makes sense, now if I can drag this one a little further from the OP. What is the reason when I use the windows calculator for example and enter a decimal number, say 16384000. According to the...
  3. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    Thank you, that was very helpful. I have been...

    Thank you, that was very helpful. I have been playing around with it, and it has brought up a new question. An example is I used your method with a long variable = 125. I was under the impression...
  4. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    Understood. I trying to ask if that was printing...

    Understood. I trying to ask if that was printing hex in the code he posted above. Hadn't seen the switches done that way.
  5. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    Hmmm. If I have just the variable in decimal...

    Hmmm. If I have just the variable in decimal form, how would I use this while still wanting hex? For example, Value32 = 250, print it out byte by byte, but still wish to see it as 000000FA or...
  6. Thread: Big Endian

    by anndruu12
    Replies
    14
    Views
    4,444

    Big Endian

    I have a program that I am going through, and writing test cases for the program when running it in little endian, vs running it in big endian. I am going through, and capturing various inputs, and...
  7. Replies
    14
    Views
    7,677

    I will update the entire code so you can see...

    I will update the entire code so you can see where I am going. I have modified it a bit so the client reads into buffer, since I couldn't get it to read directly into the array. The problem I am...
  8. Replies
    14
    Views
    7,677

    I am gathering it has something to do with using...

    I am gathering it has something to do with using strlen() as opposed to sizeof() but I am unsure how to implement that change to get my desired results. Any ideas? Thanks.
  9. Replies
    14
    Views
    7,677

    Definitions may also help. In server I have: ...

    Definitions may also help. In server I have:


    const char *face[] = { "Ace", "Two", "Three", "Four",
    "Five", "Six", "Seven", "Eight",
    "Nine", "Ten", "Jack", "Queen", "King"};
    const char...
  10. Replies
    14
    Views
    7,677

    Thanks for you help thus far. It has been...

    Thanks for you help thus far. It has been invaluable.
    A new problem I am having is I am passing the array from the server into the client, but it is not reading it.

    I have in server



    n =...
  11. Replies
    14
    Views
    7,677

    Sure thing. I will post both client and server...

    Sure thing. I will post both client and server code, though the question at hand deals with the server code at lines 139 and 140.

    Sorry for disorganization. This was been a work in progress where...
  12. Replies
    14
    Views
    7,677

    I originally had the array size set to 5, changed...

    I originally had the array size set to 5, changed it for something but didn't change it back. Either way, it still provided the same error:
    warning: assignment makes integer from pointer without a...
  13. Replies
    14
    Views
    7,677

    Assigning structure elements to an array

    Hello everyone,

    I am working on a poker program. The problem I am having is that I need to assign elements of a structure into an array so that I can pass it back to my client program for output....
  14. Replies
    5
    Views
    3,474

    Ok, so for example in my code, I have ...

    Ok, so for example in my code, I have



    typedef struct card {
    const char *face;
    const char *suit;
    }Card;
  15. Replies
    5
    Views
    3,474

    Sure, I understand that. The code will perform...

    Sure, I understand that. The code will perform that task, it will print out cards. What I want to do is either know a way to access these cards inside the struct, so that I can use them on command,...
  16. Replies
    5
    Views
    3,474

    Accessing Structure Members

    I am currently working on a client/server poker program. This file I have pulled separate for the time being while I play around with it and try to get it to work. This code is made to form the deck...
  17. Replies
    5
    Views
    2,427

    Thank you. And then in the server, you could...

    Thank you.
    And then in the server, you could use what?


    n = read(newsockfd, &choice, 1);


    Edit: I figured it out. Amazing what you can do with a little playing around haha. Thanks for the...
  18. Replies
    5
    Views
    2,427

    Since I am only inputting an integer anyway, be...

    Since I am only inputting an integer anyway, be it '1' for play poker, '2' for view stats, etc, would there be an easier way to do this? Instead of reading in to a buffer, could I just scanf into a...
  19. Replies
    5
    Views
    2,427

    Client/Server Switch using Buffer

    Hello and Happy Thanksgiving. I am working on a simple TCP Client Server poker game, and have run into a little problem. I am not the best programmer. I am modifying a previously used TCP Echo...
Results 1 to 19 of 19