[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: function arguments
+ i have to print some values. i don't know before hand what is their type and number which can only be determined when it is run.
+ i want to do something like
+
+ for(i = 0; i < num ; i++ ) {
+ str = getFormatSpecifierString(i);
+ printf(str, value[i]);
+ }
I dont know if this is a case of bad design of the function getFormat...
or you hit a wall for choosing this design. Give a try in C++, that will
definitely help you. In C, you can print in any format you want, but to
maintain uniform 'unreadability' across various formats, how about
printing all values in Hex :)
Sharad.