char url[] = Combining CHAR Variables


how combine variables

i have got 3 chat  variables want combined 1 char variable. @ moment char variables have fixed values should later on variable values inputdevices
code: [select]
char urlid[] = "/main/publishstream";    
char objectid[] = "/8";
char userid[] = "/49438038";

this 3 char variables fixed values @ moment later want have variable valeus.

how them combined in char variable char url[]

in end char url should have following value

char url[] = "/main/publishstream/9438038/8/";  

you need allocate array large enough hold of strings. then, initialize new array, , use strcat copy existing arrays new array.

or, use string object, , let take care of allocation , copying.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > char url[] =  Combining CHAR Variables


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums