The function takes two integer pointers as arguments.
"C++"
I am having trouble writeing a function that swaps two integer variables using pointers.?
void swap(int* a, int* b)
{
int temp = *a;
*a = *b;
* b = temp;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment