Hello, i've been working on some encryption as a project and now i need to turn a char array into an int array. i also want to add an integer to every single value in the int array. how would i do that? the str array contains letters and i want to turn them into their ascii numbers for the int array.
i have made this and its working but now i want to do it with arrays:
int main()
{
char a; //The characters
char b;
char c;
char d;
char e;
std::cout << "*CURRENTLY MAX 5 LETTERS* \n Please input a word to encrypt: ";
std::cin >> a; //assigns the input to a variable
std::cin >> b;
std::cin >> c;
std::cin >> d;
std::cin >> e;
int aNumber(a); //turns the variable into numbers
int bNumber(b);
int cNumber(c);
int dNumber(d);
int eNumber(e);
this is the code i currently have but how do i turn the str array into an int array?
@coder777 im making a really weak encryption and the encrypted sentence/word will be numbers so thats why i need to convert the lettters to their ascii numbers.
and i dont want to add it to just one char from the array but i want to add it to every char in the array