Are you sure you are ready for class in C++ ???
I still think that the procedural type of programming should be mastered before moving to class,,,
because it's the easier to do that than class at least for me...
class does simplified things if you're doing a project ...
but it doesn't help much if it's just a small simple program
anyway you should put the output the code in printPhoneNumberStats instead of changing the code I gave you
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
void printPhoneNumberStats(ostream& out) const
{
out<<"Printing phone number information:\n";
out<<" Country code: "<<countryCode<<endl;
out<<" Area code: "<<areaCode<<endl;
out<<" Phone number: "<<number<<endl;
out<<" Type: "<<type<<endl;
out<<" Year: "<<year<<endl;
if( doubleDigits() ) cout << "There is a double digits .... " << endl;
out<<endl;
system("pause");
out<< "\n";
}
|
and also you are not using your outputs parameter correctly change cout to out because your outputting to stream rather than a cout which is also a stream
I mean that there is multiple type of stream cout is just one of them...
I might be using all the wrong term but you should get the point...
do you get it ?