having trouble with doing swap function

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
using namespace std;
int swapName (int first,int second);
int main()
{
int a=5;
int b=10;
swapNumb(a,b)
}
void swapNumb (int &first,int &second)
{
int temp = first;
first = second;
second = temp;
}
Could it be because your function prototype doesn't match your function definition?
Topic archived. No new replies allowed.