I just got finished teaching bubble sort to my intro programming class. The book they use, prints the algorithm with a swap() function, instead of showing the actual swapping. During class, I emphasized that the "swap(x,y)" in the book was a function that they would have to write since it was not part of the C++ language. Well, I got an email from a student over the weekend noting that in fact he did not need to write a swap function for the bubble sort algorithm, that g++ recognized the swap function and that it did the right thing.
We're using the g++ in gcc version 3.4.4 20050721 (Red Hat 3.4.4-2) Is a swap function part of "standard c++"? If not, where can I read about the implementation of this particular swap in this particular compiler? Thanks, Albert _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus