of course not, I just have not found any examples that might help me out, so I can understand what I am doing better. I just don't know what functions to use in the name server that will direct the...
Type: Posts; User: newbc
of course not, I just have not found any examples that might help me out, so I can understand what I am doing better. I just don't know what functions to use in the name server that will direct the...
Well this is just a HW assignment, nothing big. It was on the c board because I will write it in c and execute it in a unix shell. From my understanding I just need two servers 1 and 2. I just need...
13199
this is how I see it. So I will need 3 servers?
Well I am using sockets in c\unix.
• Name Server (NS) to keep track of availability of all the Math Servers
• One TCP connection between each client and the Math Server (MS). Assume there are...
Ok I already have a simple tcp between one client and a server. Now what I need to do is have the same tcp client program, but now on the server program I need to implement code where if server serve...
yes it did thank you. One questions what is this line doing? copying the values to you char*?
sprintf(serialized, "%d,%d,%d",clientpacket.header,clientpacket.message, clientpacket.flag);
...
well like I said my idea was to copy the struct to a char buffer, like the using the code above for sendto(). what easy was do you suggest? that was my easy way...
okay so I am trying this code. It is suppose to copy the data from my structure to a char array but why can't I get the same values for the last long long int position [7]?
struct packet
{...
okay follow up on my question. So I am on the server side and I am trying to convert the char pbuffer to host byte order
pbuffer[20] = ntohl(pbuffer[20]);
if (sendto(sockfd, pbuffer,...
Salem thanks for the help. so I will need to copy each structure element at a time, not the whole structure using memcpy().
Hi I have a socket connection already set up, my thing is what would be the best way to send a packet through sockets? My teacher wants us to convert the packet to bits first before we send it.
I...
well I tried to modify my first program to read a line but this is what I have. We just started reading about datafiles.
0001 #include <iostream>
0002 #include <string>
0003 #include...
well I would like my first code the do the same as the second code post, that is read lines of words not just words separated by spaces.
so what im trying to do is read one line words at the time and seperate the words too.
so I read line 1:
add cars
line 2:
subtract cars
my progarm should know they are in the same line and...
ok here is my queue function that prints all the values
void Queue::displayAll()
{
if (isEmpty()) cout << "Empty ";
QueueNode *temp = frontPtr;
while (temp!= NULL)
let me just ask you the last set of questions after this I promise I won't ask you anymore.
you said "build the list in sorted order. " what do you mean by already being sorted, and are you...
im just lost and out of ideas my plan for this was create an array with empty strings (""). and start adding the words in the end of the array that is why I did
if(index+1>wordsToprocess &&...
can someboy tell me why my while loop will not exucte in the red text.
//test sample code
//
#include <iostream>
#include <cstdlib>
about question one. yes I will add them to a queue latter on.
Question #2) since
string word26[]={"a","f","j","z"}; has been declared like this can I really add more strings to it. What do you...
Well here is our assignment.
rite a C++ program that will build a Word Concordance for a series of text lines. A Concordance is basically an index of
words in a document, and a listing of...
Well out teacher told us to modify, this function to sort string names inside an array structure.
Here is what he posted in the assigment.
"The words are to be stored in a statically-declared...
I know in C the last character was the null character, but I'm confused what this means?
if ( sz[ strlen( sz ) - 1 ] == '\\' ) // Is last character a '\'?
// . . .
so why do we...
Ok first of all, my statement needs to print like this.
Second 0:
Running: No Jobs
Queue 0: Empty
What do you mean by "Loop over the items and destroy them."
ok I think I figured out how to print item on the bottom;
Any help on how to create the descructor?
we just converted to c++ like two weeks ago.