1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <iostream>
#include <cstdio>
int retrieveValueOfString(std::string str) {
int a, j, s = 1;
int b, k, t = 2;
int c, l, u = 3;
int d, m, v = 4;
int e, n, w = 5;
int f, o, x = 6;
int g, p, y = 7;
int h, q, z = 8;
int i, r = 9;
int numberArray[str.length()]; /*
Assuming this is the correct way
to initialize this array.
*/
for(int ctr = 0; ctr < str.length(); ctr++) {
/*
Assuming there should be a few if statements
to check and see which letters of the string
represent which numbers, then add the
inside a while loop here, but have been
confused ever since I've started this.
*/
}
}
int main() {
std::string x = retrieveValueOfString("SpellcastingCricket");
std::cout << x;
getchar();
}
|