Using strictly pointer data type, write a modular C++ program that makes use of a single function called convert() to sort two integer numbers passed to it as arguments, exchanging them if the first is smaller than the second (Descending order). Example: if the function is called in main() as convert (11, 20), it should return the numbers sorted as 20, 11.

u can't return 2 value to main(),
from a function we can return only single value, to return multiple value we have to use Vector().

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.