1、结构体初始化的一种方法
typedef struct strCommonConfig
{
char Interval[sTEXT10_LEN+1]; //Interval for reading message file
char TargetFolder[sTEXT220_LEN+1]; //Folder where the message files exist
char BackupFolder[sTEXT220_LEN+1]; //Folder to backup the message file which was proceeded successfully
char BackupErrFolder[sTEXT220_LEN+1]; //Folder to backup the message file when proceeded failed
char SharePath[sTEXT150_LEN+1]; //Path used by client program to get message file from server
char StopFlagFile[sTEXT220_LEN+1]; //Path and file name used to stop this program as a signal
}COMMONCONFIG;
COMMONCONFIG strCommonConfig;
memset(&strCommonConfig, 0, sizeof(COMMONCONFIG));
2、指针数组
char *flags[] = {"H", "DEBUG", NULL};