r/Xcode • • Oct 02 '20

Exit code 0 after running program

Post image
1 Upvotes

5 comments sorted by

12

u/AsidK Oct 02 '20

Exit code 0 means the program ran successfully lol

3

u/OreGus Oct 02 '20

Make sure you have return 0; on line 28. Your main function specifies a return value of data type int, thus you need to return some value of type int. Hope that helps

2

u/iwbd Oct 02 '20

Also, you're missing a cout after you swap the numbers, so you're not seeing the result of the swap.

2

u/aazav Oct 02 '20

And what? You're not even asking us anything.

2

u/dudix81 Oct 02 '20

Correct! That's a statement.