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.
Type: Posts; User: anndruu12
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.
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...
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...
Understood. I trying to ask if that was printing hex in the code he posted above. Hadn't seen the switches done that way.
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...
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...
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...
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.
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...
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 =...
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...
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...
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....
Ok, so for example in my code, I have
typedef struct card {
const char *face;
const char *suit;
}Card;
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,...
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...
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...
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...
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...