Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个结构,在其中我必须指向指针(每个指针都指向一个 char 数组)。如何创建一个指向结构内这些指针之一的指针?
假设 C:
struct foo { // a struct char (*a)[10], (*b)[10]; // pointers to arrays[10] of char }; struct foo x; // create an object char (**p)[10]; // pointer to pointer to array[10] of char p = &x.a; // point to one of the pointers inside the struct