60 478
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #13638 in C++ for Chad Dylan Cooper

Question #13638
Write the C++ statement that declare an object e1 of type testClass, and initializes the instance variables of e1 to 10 and 65.5 respectively.
Expert's answer
#include <iostream>
using namespace std;

class TestClass{
int i;
float f;
public:
TestClass(int _i, float _f):i(_i),f(_f){}
};
int main(){
TestClass e1(10,65.5);
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