The code causing the problem in question is shown below:
for(size_t i = 10; i >= 0; i--){
cout << i << ", ";
}
this outputs: 4, 3, 2, 1, 0, 18446744073709551615,
and then the program returns a segmentation fault for the obvious reason that it attempts to access my the items at a ridiculous index.
why does the counter not stop at 0?
EDIT: I was using a webcompiler for an assignment. It didn't provide any warnings. Generally I develop locally and then just paste in what I've made because I have had compiler issues before. Good to know I wasn't being completely dumb even though the issue was small. Thanks for all the help! Just figured i'd adda little additional information added after many of the answers were given.