Hi. Can Someone Plz Help With This Code. It Gives A Error When I compile It. Cant Figure Out What The Error Is:( I Use Dev c++ BTW
#include<iostream>
using namespace std;
int CBV(int);
void CBR(int&);
main()
{
int y=0;
cout<<"Enter A Number:";
cin>>y;
int ret=CBV(y);
cout<<"Call By Value: "<<ret;
cout<<"Call By Reference: "<<CBR(y);
cin.ignore();
cin.get();
}
#include<iostream>
usingnamespace std;
int CBV(int);
void CBR(int&);
int main()
{
int y = 0;
cout << "Enter A Number:";
cin >> y;
int ret = CBV(y);
CBR(y);
cout << "Call By Value: " << ret << endl;
cout << "Call By Reference: " << y << endl;
cin.ignore();
cin.get();
return 0;
}
int CBV(int x)
{
x = x * x;
return x;
}
void CBR(int& y)
{
y *= y;
}