Allocating an array of an unkown size
I have a problem. What I'm trying to do is to make a program which would take text as input and store it in a character array. Then I would print each element of the array as a decimal. E.g. "Hello World" would be converted to 72, 101, etc.. I would use this as a quick ASCII2DEC converter. I know there are online converters but I'm trying to make this one on my own. The real problem is this: how can I allocate an array whose size is unknown at compile-time and make it the exact same size as the text I enter? So when I enter Hello World it would dynamically make an array with the exact size required to store just Hello World. I have searched the web but couldn't find anything that I could make use of. Thanks for your suggestions in advance! 

Tuntuni
Allocating an array of an unkown size
===

I have a problem. What I'm trying to do is to make a program which would take text as input and store it in a character array. Then I would print each element of the array as a decimal. E.g. "Hello World" would be converted to 72, 101, etc.. I would use this as a quick ASCII2DEC converter. I know there are online converters but I'm trying to make this one on my own. The real problem is this: how can I allocate an array whose size is unknown at compile-time and make it the exact same size as the text I enter? So when I enter Hello World it would dynamically make an array with the exact size required to store just Hello World. I have searched the web but couldn't find anything that I could make use of. Thanks for your suggestions in advance! 

Tuntuni