69,371
社区成员
发帖
与我相关
我的任务
分享
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
//#include "class.h" //你这class头文件里是什么?
#define TC_FILDES()
typedef struct{
TC_FILDES() //这里是上面定义的宏 #define TC_FILDES()见上面代码
}TC;
typedef struct{
TC *tc;
int a;
}USE;
typedef struct{
int x;
int y;
}LOCATION;
void func(TC *);
void main(){
LOCATION loc;
USE use;
loc.x = 1;
loc.y = 1;
use.tc = (TC *)&loc;
func(use.tc);
}
void func(TC *tc ){
LOCATION *pLoc;
pLoc = (LOCATION *)tc;
//Operation with pLoc
pLoc->x;
pLoc->y;
}