Home > Back-end >  Please comment to constantly add content into the char
Please comment to constantly add content into the char

Time:01-02

Char \ [2048].
Can now get TXT [I] biaoti this I up to 15, with the content inside the
Such as the 123456 [1] [2] [3] 789456 123145 this
Now and then to achieve all this title in a effect is packaged and loaded into temp

Print temp can see 123456 | 789456 | 123145 | | XX XX this is equivalent to the "|" to identify future retrieval


TXT [I] biaoti is type int

Also tried to char type and then use the string copy but behind and in front of the covered
Cover problem with sprint is also there is a hope bosses can guide the small white thank you

for (int i=0; i<15. I++)
{
If (TXT [I] biaoti==RUE)
{
Here is really don't know how to write the


}
}

CodePudding user response:

For example

Memset (temp, 0, sizeof (temp));//initialize the temp
Sprintf (temp, "% d", TXT. [0] biaoti);//copy the first TXT to temp
for(i=1; i<15. I++) {//cycle TXT
Sprintf (temp + strlen (temp), "| % d", TXT [I] biaoti);//each TXT appended to the end of the temp
}
Printf (" % s ", temp);//print to see results
  • Related