Please see my comment to the question.
Okay, one hint for you: the meaning of the verb "swap" does not imply any result, any status of the operation. Therefore, the function result should be void. Yes, such functions really can be used for bubble sort. This is one of the possible examples from MSDN:
http://msdn.microsoft.com/en-us/library/twcad0zb.aspx[
^].
—SA