Making a variable the value of multiple other variables and words

I want to say that variable A is TEMP:((float)DHT11,2) and HUM:((float)DHT11,1)

Is this possible?

Do you mean the logical AND or just 'both values'?

A variable can only be one value at a time, same as you can only be in one place at once.

What are you trying to do?

I think the keyword you are looking for is "struct" or possibly "union".

marco_c:
Do you mean the logical AND or just 'both values'?

A variable can only be one value at a time, same as you can only be in one place at once.

What are you trying to do?

In Ruby or shell scripting as well as other languages i can do this:
TIME="9:00 PM"
DATE=`date
varA="Time:$TIME and Date: $DATE"
echo $varA

That would return: Time: 9:00 PM and Date: 5/15/2012

I am trying to use the tweet library to tweet two readings from my DHT11 sensor. The first being temp and the second being humidity

In the example it uses : twitter.post(msg) to send the message to twitter. Above that msg is decalred as

char msg[] "This is an arduino"

I want to set msg to several items, almost like building a sentence and post the completed sentence.

What I see in the library is the same I see in the web client example, they are using multiple clint.print statements to formulate the full url to post the twit, one of the client.print has the value of strlength(msg)

I will google arduino struct and union today to see if those will help solve this as well.

Thanks

If you search the forum for twitter, you will find examples of others doing this.

I will google arduino struct and union

Just google "C/C++ struct" or "C/C++ union".

I think what you really want to do is to concatenate strings and variables. There is an example here:

If you're just trying to create a string with some text and the values of your variables in it, you could normally use sprintf. Note though that the version of sprintf that the IDE uses does not support floats. You can use dtostrf to get each float into a string and then use sprintf with some %s parameters to build your final output.

wildbill:
If you're just trying to create a string with some text and the values of your variables in it, you could normally use sprintf. Note though that the version of sprintf that the IDE uses does not support floats. You can use dtostrf to get each float into a string and then use sprintf with some %s parameters to build your final output.

Wildbill

Thanks for that info I started to look at that last night though still a bit stuck on it. I will also check out the other suggestions posted.

Thanks