-1

ok here's the current situation:sprintf(blah, "%c%-.6s%c", QUOT, varName, QUOT);my question is, how can i use a variable instead of that 6 in there?because i'm supposed to print a whole bunch of strings with variable size (

3
Contributors
3
Replies
5
Views
10 Years
Discussion Span
Last Post by Sumanth13
0

ahh thanks man
works like a charm :)

would have been nice if the project wasn't reassigned to smn else..

-2
sprintf(str_name,"%d",int_name);/*INT*/
sprintf(str_name,"%f",float_name);/*FLOAT*/

where
int/float_name:The name of the values which has to be converted into string.
str_name :The string in which the converted value has to be stored.

Edited by Sumanth13: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.