I want to concatenate two .textNumber in a just one.
Example:
actor1.textNumber = 17
actor2.textNumber = 34
I want to create a new "actor.textNumber" with a number 1734.
How can I do that ?
char add[3];
sprintf(actor.text, "%d", Actor1.textNumber);
sprintf(add, "%d", Actor2.textNumber);
strcat(actor.text, add;
actor3.textNumber = (actor1.textNumber * 100) + actors.textNumber;
    strcpy(n3.text,n1.text);  //copy first number '17' into new actor
    strcat(n3.text,n2.text); //concantenate number '34' onto '17'
    strcpy(cDisplayValue,n3.text); //var to hold the char
    iDisplayValue = atoi(cDisplayValue); //convert the char to a number  if(iDisplayValue >= iMyOtherValue){
     do something
   }
//use the strcpy,strcat, and atoi functions to manipulate your text and numbers...Users browsing this forum: No registered users and 1 guest