Pau*_*cks 50 c c++ struct pointers
我一直在研究Cell处理器,我正在尝试创建一个结构,它将保存一个spe_context_ptr_t,它将在线程中用于启动一个spe上下文,并且还将保存指向其他将被传递给来自线程内的spu上下文(目前我正试图让它成为通用指针,但实际上它将是指向我定义的另一个结构的指针).当我尝试编译时,我收到以下错误:
spu/../common.h:38: error: expected specifier-qualifier-list before 'spe_context_ptr_t'
// here is the offending line(s)
typedef struct _PTHREAD_BLOCK {
spe_context_ptr_t * context; // Error happens here
uintptr32_t args;
} PTHREAD_BLOCK;
Run Code Online (Sandbox Code Playgroud)
Tre*_*ent 61
编译器不知道spe_context_ptr_t是一种类型.编译此代码时,请检查相应的typedef是否在范围内.您可能忘记包含适当的头文件.