libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Can a C function can formatted print selected members of


From: lingweicai
Subject: [libmicrohttpd] Can a C function can formatted print selected members of a struct array
Date: Mon, 25 Feb 2019 08:09:20 +0800 (CST)

Dear: 


I have a struct array, for example struct user { int id; char name[]; unsigned char age }; and array of the struct user with 100 records(items). 


I can write for a function for each selected members, but I want to write a function, with selected struct members as the function arguments, like a sql select to print a table. 


for example, general_fun (  struct user * user_array[100] , ... )   


if I want print qty 100 of user ID, I call general_fun ( array, id);

if I want to print qty 100 of user id and name, I call general_fun( array, id, name); 

are there these kind of functions in C ?

Thanks,

Forrest Ling











reply via email to

[Prev in Thread] Current Thread [Next in Thread]