Skip to main content

All Questions

Filter by
Sorted by
Tagged with
5 votes
2 answers
314 views

Creating a variadic function that prints any kind of format of ("c", "f", "i", "s"), but doesn't work

I've created a struct, that groups the format character and a pointer to the function which prints according to the formatter. typedef struct formatter { char spec; void (*print)(va_list); } fmt; ...
Ehab Elsayed's user avatar
2 votes
2 answers
216 views

How to run a function using a function pointer that located in a struct? (C)

I want to create an array of structs based on one struct definition, and initialize each one with a different int value. Then, I want to print this value, using a function pointer that points to a ...
NoobCoder's user avatar
  • 615