Now for an entire array you could use a for loop on a newly initialized int or char array.
1 2 3 4
vector<char> chars('A', 10); //creates a char array of size ten with all 'A'
vector<int> ints(chars.size()); //creates a new array with the same amount of space as the chars array
for(int i=0; i<chars.size(); i++)
ints[i] = int(chars[i]);
You don't need any casts at all if you want to assign a char to an int because char is an integral type as well and it's size is guaranteed to be smaller or equal to int.
Is Moschops' answer in the right ball park? It's the only one which, to me, fits the wording of the original question. But you never know.
If you are packing and unpacking ints into a char buffer to send over sockets, or into a file which might be read on a machine running a different operating system, then you might have to worry about endianness.
Data sent over sockets should generally be in network byte order (i.e. big-endian).
nickoolsayz, "char" is an integral type like short, int, and long - it is not different or 'special'. Character literals ('A') are of type char and string literals ("A") are of type char*, just as integer literals (1234) are of type int, hence why when you write an integer literal larger than the maximum size of an integer it does not work.