相关疑难解决方法(0)

这个错误意味着什么:"错误:'type_name'之前的预期说明符 - 限定符列表"?

我一直在研究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)

c c++ struct pointers

50
推荐指数
1
解决办法
16万
查看次数

C中的链接列表,没有成员错误

我正在尝试为类编写一个数据库,其中我从文件中读取了所有键值(格式化的keyNULL BYTEvalueNULL BYTE等).我很想使用链接列表,但我得到结构没有下一个值的错误.请帮我!

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include <stdbool.h>

#include "sdbm.h"

static FILE *db;
static bool opened = false;
static int err = 0, keyLen = 8;

typedef struct {
  char *name;
  Key *next;
} Key;

static Key *head = NULL,*tail = NULL; 
/**
 * Create new database with given name. You still have
 * to sdbm_open() the database to access it. Return true
 * on success, false on failure.
 */
bool sdbm_create( const char *name …
Run Code Online (Sandbox Code Playgroud)

c linked-list

2
推荐指数
1
解决办法
929
查看次数

标签 统计

c ×2

c++ ×1

linked-list ×1

pointers ×1

struct ×1