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

C / C++ / MFC

 
GeneralVC 5 <-> VC6 Pin
JensB26-May-03 0:04
JensB26-May-03 0:04 
GeneralScope Error Pin
Paul Hooper25-May-03 23:45
Paul Hooper25-May-03 23:45 
GeneralRe: Scope Error Pin
John R. Shaw26-May-03 9:51
John R. Shaw26-May-03 9:51 
GeneralRe: Scope Error Pin
John R. Shaw26-May-03 10:04
John R. Shaw26-May-03 10:04 
GeneralCommunication problem between dialog window and frame window Pin
chen25-May-03 23:38
chen25-May-03 23:38 
GeneralRe: Communication problem between dialog window and frame window Pin
Rage25-May-03 23:52
professionalRage25-May-03 23:52 
QuestionHow Do I Drag&Drop an ActiveX Control Pin
ccdai25-May-03 23:11
ccdai25-May-03 23:11 
GeneralParsing in C Pin
Rickard Andersson2025-May-03 22:57
Rickard Andersson2025-May-03 22:57 
I have some problems with my code here. You can see where the error appears in the code:

char szCommand[] = "luc 192.168.244.151 5000 50 mypass";

void HotIceParser(const char* command, PHIPD phipd)
{
	char buffert[20+1] = {0};
	char* p1 = NULL;
	char* p2 = NULL;

#ifdef DEBUG_MODE
	assert(phipd != NULL);
#endif
	
	p1 = &buffert[0];
	p2 = &command[0];

	while((*p2 != ' ') && (*p2 != '\0'))
		*p1++ = *p2++;

	MessageBox(NULL, buffert, "1",MB_OK);

	if(strcmp(buffert,"luc") == 0)
	{
		phipd->type = LUC;
		p1 = &buffert[0];
		p2++;
		while((*p2 != ' ') && (*p2 != '\0'))
			*p1++ = *p2++;

		MessageBox(NULL, buffert, "2",MB_OK); // STACK AROUND buffert IS CORRUPTED!!! WHY??
		strcpy(phipd->luc.pszIP, buffert);
	}
}


Can you help me to solve this?

Rickard Andersson8
Here is my card, contact me later!

UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s


GeneralRe: Parsing in C Pin
jhwurmbach25-May-03 23:26
jhwurmbach25-May-03 23:26 
GeneralRe: Parsing in C Pin
Rickard Andersson2026-May-03 0:24
Rickard Andersson2026-May-03 0:24 
GeneralRe: Parsing in C Pin
John R. Shaw26-May-03 10:13
John R. Shaw26-May-03 10:13 
GeneralRe: Parsing in C Pin
Paul Hooper25-May-03 23:29
Paul Hooper25-May-03 23:29 
GeneralRe: Parsing in C Pin
Rickard Andersson2026-May-03 0:30
Rickard Andersson2026-May-03 0:30 
GeneralRe: Parsing in C Pin
Paul Hooper26-May-03 1:51
Paul Hooper26-May-03 1:51 
GeneralRe: Parsing in C Pin
Rage25-May-03 23:46
professionalRage25-May-03 23:46 
GeneralRe: Parsing in C Pin
Rickard Andersson2026-May-03 0:32
Rickard Andersson2026-May-03 0:32 
GeneralRe: Parsing in C Pin
Ryan Binns26-May-03 1:46
Ryan Binns26-May-03 1:46 
GeneralRe: Parsing in C Pin
jhwurmbach26-May-03 2:19
jhwurmbach26-May-03 2:19 
GeneralRe: Parsing in C Pin
Ryan Binns26-May-03 2:22
Ryan Binns26-May-03 2:22 
GeneralRe: Parsing in C Pin
Rickard Andersson2026-May-03 5:27
Rickard Andersson2026-May-03 5:27 
GeneralSimple get started questions Pin
Jon H25-May-03 22:44
Jon H25-May-03 22:44 
GeneralRe: Simple get started questions Pin
Andrew Walker25-May-03 23:32
Andrew Walker25-May-03 23:32 
Generalunicode, resources Pin
Joerg Wiedenmann25-May-03 22:24
Joerg Wiedenmann25-May-03 22:24 
GeneralRe: unicode, resources Pin
John R. Shaw26-May-03 10:29
John R. Shaw26-May-03 10:29 
GeneralConstruct Null Object If I/O Operation Fail In The Constructor Pin
yccheok25-May-03 22:22
yccheok25-May-03 22:22 

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.