How do you take a string full of letters and spaces and put them all into an array? I'm thinking pointers, but I'm not sure.

For example:
string random = "hello everyone";
int array[50];
//how would i put the contents of that string into array?

Any help would be appreciated. Thanks.

04-13-2008

CornedBee

The array holds integers. What do you expect to happen when you say that you want to put the string contents there?

04-13-2008

Gaming

Hm, thats what I was thinking. I was thinking alphabetical substitution. Encrypting it into integers, and when printing it out, decrypts it back to characters. Thanks for reminding me!! I'll post my code here once I'm finished. Thanks again xD!

04-13-2008

laserlight

What purpose would this array serve? Note that the characters of std::string are integers of type char.