-1
私はこの構造に出くわしました。私はそれらを別々に書いているので、私は愚かなので、両方を "解剖"するのに苦労しています。ここで構造/リンクされたリストを理解する
は、構造体です:
typedef struct no_disciplina * ListDisciplinas;
typedef struct no_disciplina
{
char * nome;
struct no_apont_aluno * alunos;
ListDisciplinas next;
} NoDisciplina;
typedef struct no_aluno * ListAlunos;
typedef struct no_aluno
{
char * nome;
int numero;
struct no_apont_disciplina * disciplinas;
ListAlunos next;
} NoAluno;
typedef struct no_apont_disciplina * ListApontDisciplinas;
typedef struct no_apont_disciplina
{ ListDisciplinas disciplina;
ListApontDisciplinas next;
} NoApontDisciplina;
typedef struct no_apont_aluno * ListApontAlunos;
typedef struct no_apont_aluno
{
ListAlunos aluno;
ListApontAlunos next;
} NoApontAluno;
また、これらのリンクリストは、ヘッダ(単にリストの最初の「本当の」ノードへのポインタで構成されるノード)を持っていないと言われてそうか私はそれを定義するのですか?
ありがとうございます:D!
私はラインtypedef struct no_disciplina * ListDisciplinasを推測しています。リストのヘッダを作る? –