mevicky4u2k11
Member • Aug 24, 2011
debugging code: plz debugg this code....
plz debug this....i need it ...plzz help...
#include
using namespace std;
class swapping;
{
cout << "Swapping value of two numbers \n";
int firstnumber, secondnumber;
public:
void getdata (int N1, N2);
void putdata (void);
{
cout << "firstnumber =" << firstnumber << "\n";
cout << "secondnumber =" << secondnumber << "\n";
}
};
void swapping :: getdata (int N1, N2)
{
int x=0;
x=firstnumber;
firstnumber= secondnumber;
secondnumber= x;
N1 = firstnumber;
N2 = secondnumber;
}
int main ()
{
swapping a;
cout << "\n object a " << "\n";
a.getdata (23, 32);
a.putdata();
return 0;
}
#include
using namespace std;
class swapping;
{
cout << "Swapping value of two numbers \n";
int firstnumber, secondnumber;
public:
void getdata (int N1, N2);
void putdata (void);
{
cout << "firstnumber =" << firstnumber << "\n";
cout << "secondnumber =" << secondnumber << "\n";
}
};
void swapping :: getdata (int N1, N2)
{
int x=0;
x=firstnumber;
firstnumber= secondnumber;
secondnumber= x;
N1 = firstnumber;
N2 = secondnumber;
}
int main ()
{
swapping a;
cout << "\n object a " << "\n";
a.getdata (23, 32);
a.putdata();
return 0;
}