user-0 提问: error C2065 未声明的标识符。 已经引入头文件为什么还是未声明？

回复:
user: user-1
content: VS2013测试通过，建议完全重编下试试

user: user-0
content: 谢谢指正!Bug我都修改了。但是还是老情况 Node *head; head = creat(); 会提示head未声明的标识符，Node此类型用作表达式非法。 是VS2010的问题吗？ 修正以后的代码： #include <stdio.h> #include <stdlib.h> #include <string.h>  typedef struct vector{ 	int x; 	int y; }vec;  typedef struct node{ 	vec a; 	struct node *next; }Node;  Node *creat(); void DestoryStack(Node *head); int StackEmpty(Node *head); int StackLenth(Node *head); int GetTop(Node *head, vec *b); void Push(Node *head, int a, int b); void Pop(Node *head);  Node *creat(){ 	Node *head = NULL; 	head = (Node *)malloc(sizeof(Node)); 	if (head == NULL){ 		printf("fail to creat"); 	    return NULL; 	} 	head -> next = NULL; 	return head; }  void DestoryStack(Node *head){ 	if (head){ 		Node *tail, *pnew = NULL; 		if (head ->next) 			tail = head ->next; 		free(head); 		while (tail ->next){  			pnew = tail ->next; 			free(tail); 		} 		free(pnew); 	} }  int StackEmpty(Node *head){ 	if(head->next){ 		return 1; 	} 	return 0; }  int StackLenth(Node *head){ 	int num; 	Node *tail = NULL; 	if(head)num=1; 	else return 0; 	tail = head; 	if(tail->next){ 		tail = tail->next; 		num++; 	} 	return num; }  int GetTop(Node *head, vec *b){ 	Node *tail = NULL; 	tail = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = tail->next; 		} 		b= &tail->a; 		return 1; 	} 	return 0; }  void Push(Node *head, int a, int b){     Node *tail, *pnew = NULL; 	tail = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = tail->next; 		} 		tail->next=(Node *)malloc(sizeof(Node)); 		pnew = tail->next; 		pnew->next = NULL; 		pnew->a.x = a; 		pnew->a.y = b; 	} }  void Pop(Node *head){ 	Node *tail, *last = NULL; 	tail = head; 	last = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = last; 			last = last->next; 		} 		free(last); 		tail->next =NULL; 	} }

user: user-2
content: if (head = NULL){  改成   if (head == NULL){   GetTop 不是所有路径都有返回  extern Node *creat(){  写成  Node *creat(){  吧

user: user-3
content: 我这没问题, 不过bug太多了，  严重性	代码	说明	项目	文件	行	禁止显示状态 警告	C4709	逗号运算符在数组索引表达式内	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\main.c	11	 警告	C4709	逗号运算符在数组索引表达式内	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\main.c	16	 警告	C4709	逗号运算符在数组索引表达式内	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\main.c	21	 警告	C4709	逗号运算符在数组索引表达式内	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\main.c	26	 警告	C4706	条件表达式内的赋值	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	26	 错误	C4703	使用了可能未初始化的本地指针变量“tail”	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	40	 错误	C4703	使用了可能未初始化的本地指针变量“pnew”	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	44	 警告	C4701	使用了可能未初始化的局部变量“tail”	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	40	 警告	C4701	使用了可能未初始化的局部变量“pnew”	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	44	 警告	C4715	“GetTop”: 不是所有的控件路径都返回值	DDT1	c:\users\administrator\documents\visual studio 15\projects\project1\ddt1\linkedstack.h	77

user: user-0
content: #include <stdio.h> #include <stdlib.h> #include <string.h>  typedef struct vector{ 	int x; 	int y; }vec;  typedef struct node{ 	vec a; 	struct node *next; }Node;  extern Node *creat(); void DestoryStack(Node *head); int StackEmpty(Node *head); int StackLenth(Node *head); struct vector GetTop(Node *head); void Push(Node *head, int a, int b); void Pop(Node *head);  extern Node *creat(){ 	Node *head; 	head = (Node *)malloc(sizeof(Node)); 	if (head = NULL){ 		printf("fail to creat"); 	    return NULL; 	} 	head -> next = NULL; 	return head; }  void DestoryStack(Node *head){ 	if (head){ 		Node *tail, *pnew; 		if (head ->next) 			tail = head ->next; 		free(head); 		while (tail ->next){  			pnew = tail ->next; 			free(tail); 		} 		free(pnew); 	} }  int StackEmpty(Node *head){ 	if(head->next){ 		return 1; 	} 	return 0; }  int StackLenth(Node *head){ 	int num; 	Node *tail; 	if(head)num=1; 	else return 0; 	tail = head; 	if(tail->next){ 		tail = tail->next; 		num++; 	} 	return num; }  struct vector GetTop(Node *head){ 	Node *tail; 	tail = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = tail->next; 		} 		return tail->a; 	} }  void Push(Node *head, int a, int b){     Node *tail, *pnew; 	tail = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = tail->next; 		} 		tail->next=(Node *)malloc(sizeof(Node)); 		pnew = tail->next; 		pnew->next = NULL; 		pnew->a.x = a; 		pnew->a.y = b; 	} }  void Pop(Node *head){ 	Node *tail, *last; 	tail = head; 	last = head; 	if(!StackEmpty(head)){ 		if(head->next){ 			tail = last; 			last = last->next; 		} 		free(last); 		tail->next =NULL; 	} } 这是头文件。麻烦帮忙看看！！