Я изучаю график (список смежности) от гиков к гикам и вижу этот код:
// A structure to represent an adjacency list node
struct AdjListNode
{
int dest;
struct AdjListNode* next;
};
// A structure to represent an adjacency liat
struct AdjList
{
struct AdjListNode *head; // pointer to head node of list
};
// A structure to represent a graph. A graph is an array of adjacency lists.
// Size of array will be V (number of vertices in graph)
struct Graph
{
int V;
struct AdjList* array;
};
Я хотел бы знать разницу между:
struct AdjListNode* next;
и struct AdjListNode *head;
и struct AdjListNode * head;
*
всегда связан с декларатором, а не со спецификатором типа;T *a
иT* a
оба анализируются какT (*a)
. Пробелы в данном случае не имеют значения. - person John Bode   schedule 22.05.2015