D Jake
D Jake

Reputation: 63

Using a variable as structure identifier

I've got a small question regarding dynamic structure definitions. When declaring a structure definition under ANSI-C, is it possible to use a "string"-variable as a structure identifier like below?

*(a_string_var) = "username";
struct user *(a_string_var); 

Upvotes: 0

Views: 153

Answers (1)

Justin Spahr-Summers
Justin Spahr-Summers

Reputation: 16973

No, all declarations in C must use static, inline identifiers.

Upvotes: 2

Related Questions