No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I made two simple client and server socket chat programs. Client connects to and interacts with the server application perfectly on localhost, but I can't get the client to connect over directly connected LAN. The client/server are connecting to/listening on port 2869 - the only port I found that would … |
|
i'll start typing a command in the telnet module to communicate with my telnet server after i've already been connected and the server will suddenly drop me, exit telnet, and bring up the cmd prompt. what in this code is doing this? [code]void do_handleclient(int connsock,struct sockaddr_in *client_addr) { // Communicating … |
|
what i have so far - [code]void do_handleclient(int connsock,struct sockaddr_in *client_addr) { // Communicating with our new friend. string buffer, execmd, filename; int b, n, nstr, str; char buf[25000]; char *cbuff=(char*)buf.c_str(); while((n=recv(connsock,buf,25000-1,0))!=0) //receiving request. buffer[n]=0; while(buffer[nstr]!=' ') { //pulling GET or POST command out of request. execmd[nstr]=buffer[nstr]; nstr++; } while(buffer[nstr]!='\r' … |
|
New to classes. Getting alot of errors when calling the private member variables (from down in main). Most are telling me either i can't access the private member variable IDs or the other member variables i'm attempting to access (debit, credit, balance) are undefined ('identifier not found'). Also getting 'overloaded … |
|
How can i read in data in different functions without losing the stream's place in the file. i.e function a and function b both open a data stream to read in first and last names from a file. however function b reads in the first name as well rather than … |
|
i'm looking to get a first name followed by four scores and finally a last name, stored into multiple arrays (a char *array, a float array, & a char *array). getting the scores i understand however the names are pointer arrays. as far that goes what am i doing wrong … |
|
is there a built in function to deal with numbers similar to how the swap member function (first.swap(second);) deals with strings? thanks |
|
Re:
I'm trying to have a getData function transfer all the objects it is holding in its array to a new array so that the new array can be used in a friend function to print the objects' information. [CODE]void Set::getData(Set& tempSet) const { for (int i = 0; i < … |
|
Just wondering if i can re-read something i just read in? [code] if(in_stream.is_open()) while(i<50 && in_stream.getline(temp, 50) && temp>0) { if(isdigit(temp)) PX1>>temp; else length=strlen(temp); [COLOR="Red"]if(length>1) { string1[]=temp; in_stream.getline(temp, 50) if(isalpha(temp)) string2[]=temp; else } else PX2>>temp;[/COLOR] i++; } in_stream.close();[/code] Hope it doesn't come across as vague but if towards the end … |
|
What is wrong with this function? [code]// /////// // void GetData(int(IDs)[], float(Scores)[][4], int &i) { //GIVEN: One blank ARRAY, one blank 2D ARRAY, & a index variable. //TASK: Function retrieves data from open stream into multiple functions. Stores ID into one structure and all of the student's test grades into … |
|
As the title states.. is it possible to pass two variables back from a float function.. one through 'return variable' & the other through reference? If it is i will post the code.. but after hours of debugging & the program is still not recognizing the changed reference parameter (but … |