占位符解析@#

啊,简直要笨死了!!!!大哭敲打

// XML解析.cpp : 定义控制台应用程序的入口点。
//


#include "stdafx.h"
#include 
#include 
#include 
#include 


using namespace std;




/**************************************************************************
char *szPacket  = "@szCamCode#@szDirect#@szTime#";




int main ()
{
	char *pcTemp;
	pcTemp = new char(128);
	memset (pcTemp,0,128);
	strcpy(pcTemp,szPacket);
	cout<<"the pcTemp is :"<	strcpy(pcTemp,"hello");
     cout<<"the pcTemp is :"<	getchar();


	return 0;
}




******************************************************************************/


char *szPacket  = "@szCamCode#@szDirect#@szTime#.xml";










int main ()
{
	char *pcTemp =szPacket;
	//只是单纯的指针
	char *pcTemp1=NULL;
	char *pcTemp2=NULL;
	//保存数据 
	char *ptr=new char[30];    // new char (30 ) ;  error 










do {
        pcTemp1=strchr(pcTemp,'@');
        cout<<"pcTemp1 is :"<		 pcTemp=pcTemp2+1;
	}while (*(pcTemp2+1)!='.');


	system("pause");
	return 0;
}




你可能感兴趣的:(The,sun,rises,anyway!/心情日志)