string formating question
#1

format(aim, sizeof(aim), "%s[R%s] [%s/3 warns] %s\n", aim, test, warns, query);

i've seen people formating a string like this and i don't understand what's the point,i mean why do they include the string itself while formating the string, the first placeholder "%s" represents "aim",wich is the string that its formated

format(aim, sizeof(aim), "%S [R%s] [%s/3 warns] %s\n", AIM, test, warns, query);

i wrote the placeholder with caps and what it represents,the AIM witch is the string itself,i don't understand
Reply


Messages In This Thread
string formating question - by bosmania - 24.03.2019, 15:56
Re: string formating question - by NaS - 24.03.2019, 16:04

Forum Jump:


Users browsing this thread: 1 Guest(s)