What I want to happen in my code below is rather than int p = *search(Which I explain below is actually equal to ascii value of "F", so 70). I want p to be equal to the element number that "F" in Files is located in the numberOfTimes c-string. See below comments in green for a more in depth example.
char * search;
//..... (declared numbeofTimes, newArea)
search = strstr(newArea, numberOfTimes);
//search now holds the address of the start
// of the char that numberOfTimes occurs in newArea
// so if I searched "Files" and numberOfTimes is "c:programFiles\win32"
// it returns the address of the F in that c-string.
if(search != NULL){
char *temp2 = newchar[(int)dataHolder[a].size()+1];
strcpy_s(temp2, (int)dataHolder[a].size()+1, dataHolder[a].data());
//Below where I set p = *search it isn't working
//All it is doing is setting p = to the value
//lets say typed Files, p = 70 (AscII for capital F)
//What I want it to do is return the element number
// of the address that the pointer points to.
for(int p = *search; temp2[p] != '\0'; p++){
cout << temp2[p];
}
cout << endl;