i am trying to do a program but i have two error and i don't know what they mean. can someone please help me.
this is the program
#include "stdafx.h"
#include <iostream>
using namespace std;
int S1(int x, int& y);
int S2(int& m, int n);
int main()
{
int a = 2, b = 2, c =2;
cout << "In main, " << endl
<< "a = " << a << endl
<< "b = " << b << endl<<endl;
a = S1(b, c);
cout << "In main, " << endl
<< "a = " << a << endl
<< "b = " << b << endl;
cout << endl << endl;
return(0);
}
int S1(int& x, int& y)
{
int t = S2(x,y);
x = y;
y = t;
cout << "In S1, " << endl
<< "t = " << t << endl
<< "x = " << x << endl
<< "y = " << y <<endl<< endl;
return(t * 3);
}
int S2(int& m, int n)
{
int r=6;
n=m;
m++;
cout << "In S2, " << endl
<< "m = " << m << endl
<< "n = " << n << endl
<< "r = " << r << endl<< endl;
return(n + 1);
}
and these are the error messages
hwassinment error LNK2019: unresolved external symbol "int __cdecl S1
(ihwassinment fatal error LNK1120:
(int,int &)" (?S1@@YAHHAAH@Z) referenced in function _main
hwassinment fatal error LNK1120: 1 unresolved externals