结构体的定义和使用问题
typedef struct{
int typenum;
char *word;
}WORD;
然后在main函数中使用是
void main()
{
int over=1;
int count=0;
WORD *oneword=new WORD;
printf("Enter Your words(end with #):");
scanf("%[^#]s",input); /*输入源程序字符串到缓冲区,以#结束*/
p_input=0;
只列了一部分,其他的没有报错
报错内容:
error C2065: 'new' : undeclared identifier
warning C4047: 'initializing' : 'struct WORD *' differs in levels of indirection from 'int '
error C2146: syntax error : missing ';' before identifier 'WORD'
error C2275: 'WORD' : illegal use of this type as an expression
see declaration of 'WORD'
这部分内容忘了,身边没书,望指教,谢谢