Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: pragma once faster as an include guards? Pin
Nemanja Trifunovic20-Nov-06 10:49
Nemanja Trifunovic20-Nov-06 10:49 
AnswerRe: pragma once faster as an include guards? [modified] Pin
Michael Dunn20-Nov-06 8:06
sitebuilderMichael Dunn20-Nov-06 8:06 
GeneralRe: pragma once faster as an include guards? Pin
User 58261920-Nov-06 8:22
User 58261920-Nov-06 8:22 
GeneralRe: pragma once faster as an include guards? Pin
Stephen Hewitt20-Nov-06 12:12
Stephen Hewitt20-Nov-06 12:12 
GeneralRe: pragma once faster as an include guards? Pin
Jörgen Sigvardsson20-Nov-06 12:24
Jörgen Sigvardsson20-Nov-06 12:24 
GeneralRe: pragma once faster as an include guards? Pin
Stephen Hewitt20-Nov-06 12:29
Stephen Hewitt20-Nov-06 12:29 
AnswerRe: pragma once faster as an include guards? Pin
Blake Miller22-Nov-06 3:53
Blake Miller22-Nov-06 3:53 
QuestionUnique Question .... Pin
Programm3r20-Nov-06 4:04
Programm3r20-Nov-06 4:04 
Hi all,

I wrote a TCP/IP client & server. The client(s) sends files for the server and the server sends files to the client(s). The server knows with which client it's communicating, by means of the computer name. The problem I'm experiencing is that if multiple clients connect, the computer name(s) of the clients gets overwritten by the next connection. I'm using this structure within a loop without success. I know this is a very though question, because alot of the code is not present, but it's like having an array and trying to keep the correct name with the correct 'connection' whiles in a loop.

<br />
static struct<br />
{<br />
	 int ConnectSock;	// (virtual) socket for connection<br />
	 int ConnectState;	// next state<br />
	 ULONG BytesTrans;	// # bytes transmitted in this upload<br />
	 ULONG FileLength;	// length of file being transmitted<br />
	 ULONG TimeMark;	// time to wait until next state<br />
	 char Request[STRING_SIZE];    // command request<br />
	 char FileName[STRING_SIZE];   // filename<br />
	 char PathName[STRING_SIZE];   // pathname<br />
	 char PCName[STRING_SIZE];     // Remote Controller Name<br />
	 ULONG BytesRec;	       // Bytes Received<br />
} gConnectData[MAX_CONNECT];<br />
<br />
// .... in a loop ....<br />
// I tried to do this - to prevent the problem without success... so to speak<br />
strcpy((char*)gConnectData[i].PCName,(char*)strDest);<br />


Many thanx in advance


The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

AnswerRe: Unique Question .... Pin
led mike20-Nov-06 4:48
led mike20-Nov-06 4:48 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 4:51
Programm3r20-Nov-06 4:51 
GeneralRe: Unique Question .... Pin
led mike20-Nov-06 5:27
led mike20-Nov-06 5:27 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:23
Programm3r20-Nov-06 19:23 
AnswerRe: Unique Question .... Pin
Zac Howland20-Nov-06 5:39
Zac Howland20-Nov-06 5:39 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:20
Programm3r20-Nov-06 19:20 
GeneralRe: Unique Question .... Pin
Zac Howland21-Nov-06 3:32
Zac Howland21-Nov-06 3:32 
AnswerRe: Unique Question .... Pin
Scott Holt20-Nov-06 14:51
Scott Holt20-Nov-06 14:51 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:26
Programm3r20-Nov-06 19:26 
QuestionRe: Unique Question .... Pin
Programm3r20-Nov-06 19:53
Programm3r20-Nov-06 19:53 
QuestionRe: Unique Question .... Pin
Zac Howland21-Nov-06 3:35
Zac Howland21-Nov-06 3:35 
AnswerRe: Unique Question .... Pin
led mike21-Nov-06 4:43
led mike21-Nov-06 4:43 
QuestionConvert pdf to tiff Pin
Dudi Avramov20-Nov-06 3:58
Dudi Avramov20-Nov-06 3:58 
AnswerRe: Convert pdf to tiff Pin
Waldermort20-Nov-06 5:22
Waldermort20-Nov-06 5:22 
QuestionCFileDialog dialog box does not come up for some unknown reason Pin
cy163@hotmail.com20-Nov-06 3:41
cy163@hotmail.com20-Nov-06 3:41 
AnswerRe: CFileDialog dialog box does not come up for some unknown reason Pin
David Crow20-Nov-06 4:02
David Crow20-Nov-06 4:02 
GeneralRe: CFileDialog dialog box does not come up for some unknown reason Pin
Mila02520-Nov-06 20:21
Mila02520-Nov-06 20:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.