Basic bubblesort implementation in C++