Click here to Skip to main content
15,914,413 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Angles Pin
Stefan_Lang31-May-11 22:51
Stefan_Lang31-May-11 22:51 
QuestionGarbage Collector vs Reference Couter Pin
Pranit Kothari31-May-11 4:53
Pranit Kothari31-May-11 4:53 
AnswerRe: Garbage Collector vs Reference Couter Pin
Chris Losinger31-May-11 4:58
professionalChris Losinger31-May-11 4:58 
AnswerRe: Garbage Collector vs Reference Couter Pin
Maximilien31-May-11 5:12
Maximilien31-May-11 5:12 
AnswerRe: Garbage Collector vs Reference Couter Pin
Nemanja Trifunovic31-May-11 6:08
Nemanja Trifunovic31-May-11 6:08 
AnswerRe: Garbage Collector vs Reference Couter Pin
Stefan_Lang1-Jun-11 0:08
Stefan_Lang1-Jun-11 0:08 
QuestionDifference between Unicode and Multibyte Pin
Pranit Kothari31-May-11 4:16
Pranit Kothari31-May-11 4:16 
AnswerRe: Difference between Unicode and Multibyte Pin
Luc Pattyn31-May-11 5:06
sitebuilderLuc Pattyn31-May-11 5:06 
GeneralRe: Difference between Unicode and Multibyte Pin
Pranit Kothari31-May-11 6:45
Pranit Kothari31-May-11 6:45 
GeneralRe: Difference between Unicode and Multibyte Pin
David Crow31-May-11 8:14
David Crow31-May-11 8:14 
AnswerRe: Difference between Unicode and Multibyte Pin
Nemanja Trifunovic31-May-11 6:11
Nemanja Trifunovic31-May-11 6:11 
GeneralRe: Difference between Unicode and Multibyte Pin
Pranit Kothari31-May-11 6:44
Pranit Kothari31-May-11 6:44 
GeneralRe: Difference between Unicode and Multibyte Pin
Nemanja Trifunovic31-May-11 8:29
Nemanja Trifunovic31-May-11 8:29 
AnswerRe: Difference between Unicode and Multibyte Pin
Richard MacCutchan31-May-11 7:40
mveRichard MacCutchan31-May-11 7:40 
AnswerRe: Difference between Unicode and Multibyte Pin
jschell31-May-11 8:26
jschell31-May-11 8:26 
Question[Win32] How compare two image Pin
Member 296547131-May-11 4:03
Member 296547131-May-11 4:03 
AnswerRe: [Win32] How compare two image Pin
David Crow31-May-11 4:07
David Crow31-May-11 4:07 
GeneralRe: [Win32] How compare two image Pin
Member 296547131-May-11 5:31
Member 296547131-May-11 5:31 
QuestionGetting floppy drive in logical drives Pin
VCProgrammer30-May-11 22:51
VCProgrammer30-May-11 22:51 
AnswerRe: Getting floppy drive in logical drives Pin
ShilpiP31-May-11 0:39
ShilpiP31-May-11 0:39 
QuestionRe: Getting floppy drive in logical drives Pin
David Crow31-May-11 3:29
David Crow31-May-11 3:29 
Questionstack error in char array Pin
arupsarkar30-May-11 16:18
arupsarkar30-May-11 16:18 
Hi:

I have a socket client running which has a char array of size 512 mentioned. I have a loop to receive the message from the server, when the loop exits I am getting the following error.

I also confirmed that the message I am receiving from the server is less than 200 characters in length.

Environment:
Windows 64bit.
VS 2010

Run-Time check failure #2 - Stack around the variable 'recMessage' was corrupted.

int STRLEN = 512;
char recMessage[STRLEN] = "0";
ClientSocket sockClient;

sockClient.ConnectToServer( ipAddress.c_str(), port );
sockClient.SendData("L|100=some_value;101=some_value\n");
sockClient.RecvData( recMessage, STRLEN );

int counter = 0
while(counter <= 10){

	sockClient.RecvData( recMessage, STRLEN );
	cout << recMessage << endl;
	counter++;
}

memset(recMessage,0,sizeof(char)*STRLEN);
sockClient.CloseConnection();

</pre>

AnswerRe: stack error in char array Pin
«_Superman_»30-May-11 18:43
professional«_Superman_»30-May-11 18:43 
AnswerRe: stack error in char array Pin
tolw30-May-11 18:59
tolw30-May-11 18:59 
GeneralRe: stack error in char array Pin
Stefan_Lang30-May-11 22:33
Stefan_Lang30-May-11 22:33 

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.