在c++中,如何使结构体变量声明为,别的.cpp文件可以访问的外部声明
我有一个typedef.h文件 内容如下:
#include "stdafx.h"
#include <stdio.h>
#include <malloc.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
//业主信息结构体部分
typedef struct node
{
char telephone[15];
char name[20];
char IP[20];
char NO[10];
struct node *next;
}OWNER;
//栋号,层号,房间号,结构体部分
typedef struct cnode
{
int cnum;
char ID[3];
struct cnode *lchild;
struct cnode *rchild;
OWNER *owner;
}CNODE;
OWNER * head = NULL;
OWNER *tail = NULL;
CNODE *root = NULL;
CNODE *ctail = NULL;
如何使,head ,tail,root,ctail变量声明为,别的.cpp文件可以访问的