char rCubeProcedural (char inPT, string inKey)
char **inPTClone = inPT; //defines a placeholder array
int keyLength = inKey.length(); //gets the length of the key
int keyPos = 0; //holds the place in the key where the program is.
for(int i=0; i < 4; i++) //cycles through the y value of the array
for(int j=0; j > 4; j++) //cycles through the x value of the array
int ascii = static_cast<int>(inKey.get(keyPos)); //converts the ascii charecter in the key to an interger
if(ascii > 16) //converts the integer into a usable one, less than 16, because our array is 4x4
ascii -= (ascii - 16);
int arrayY = ascii / 4; //pulls a y adress from the integer
int arrayX = ascii - arrayY; //pulls an x value form the integer
inPT[j][i] = inPTClone[arrayX][arrayY]; //replaces a cell of the array with one from a different location
if(keyPos < inKey.length()) //cycles to the next charecter in the key
}else //unless you are at the end of the key, start over.
keyPos = 0;
the problem is that the fisrt char in the declaration is underlined red, as well as both the fors, and every time i use the variable inKey. does anybody know why this might be happening?
right sorry for not replying sooner, thanks for the heads up on the for loop, and the function thing, and i made sure i included all of the needed. I still get errors on my inKey.get, and on char inPTClone = inPT, anny suggestions as to why?
If you have compile errors - then post them here in full & make sure we can see which line number in your code the errors are referring to. You can put a firstline=x (where x is the first line number) inside the opening code tag so the line number match up.
and on char inPTClone = inPT, anny suggestions as to why?
As cire said. - maybe you meant to do assignment inPTClone = inPT; where the declaration char inPTClone; already exists.