Filling Arrays

How do I fill an array >_>?

Here's the basic idea of what I'm trying to do...

1
2
3
4
char name [20];
name[1] = B;
name[2] = o;
name[3] = b;


I just want to fill each space with an individual character when I need to. For example, when the user types something and needs to backspace, I can remove the last character in the array...

Anyone know what I'm doing =P?
is this specifically a question about arrays or do you just need to do this with characters? If you're just doing this with characters for names etc then use std::strings and use the string's member functions which do basically everything you could ever want to do with a string.
is there a function in std::string that removes the last character of the string?
Nevermind, found it. Thanks quirky!

http://www.cplusplus.com/reference/string/string/erase/
Topic archived. No new replies allowed.