1) this code doesn't compile. You can't make declare 'scores' the way you are on line 10. If you want to have a variable size, either use std::vector, or allocate it with new:
1 2 3 4
int* scores = newint[numOfRolls];
// then at end of function
delete[] scores;
also I assume line 17 is supposed to be 'lastNum' and not 'lcastNum'.
2) you're using time(), but not including <ctime>
3) don't srand repeatedly. It defeats the point of using it. You're only supposed to do it once at startup, not for every random number. Move the srand call to main
4) (your actual problem) Look at line 14. You're adding a pointer to an integer, and then couting the result. This results in a pointer offset by 'rndNum' which is a bad pointer, which makes cout output garbage.
Do not use the + operator like this. Instead change that line to: