Your issue is that the variables "seven" and "eight" are not declared in main(). They were declared as local variables in a function and cannot be accessed in main(). In order to access them in main(), you can return their values from the fakeSwap() and realSwap() functions in an std::pair. Just use std::pair<int, int> as the return type for the function. This allows a pair holding two integer elements to be returned. You can also store each element separately in its own variable. You can access the elements in the pair using this syntax: pairName.first for the first element, pairName.second for the second one. Hope this helps!