Bubble sort implementation

Implementation of bubble sort in c++. For some reason works in g++ 4.8.1 and not in g++ 4.1.3