67 020
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #12589 in C++ for sofiya sabri

Question #12589
find error
# include <iostream.h>
class xyz
{
private:
int d1;
float d2;
public:
void xyz ()
void display ();
};
void main ()
{
xyz s;
s.showdata();
}
Expert's answer
There should be implementation of the methods used:

#include
<iostream>
using namespace std;
class xyz
{
private:
int
d1;
float d2;
public:
xyz ()
{
d1 = 3;
d2 =
3.14159f;
}

void display ()
{
cout << "d1 = " << d1
<< endl << "d2 = " << d2 << endl;
}
};

int
main ()
{
xyz s;
s.display ();
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions