No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
Re: [QUOTE=chaithanyap;948678]#include<iostream.h> class A { public: read() {cout<<"read"; }}; class B:public A {public: readb() { cout<<"readb"; } }; class C:public A { public: readc() {cout<<"readc"; } }; class D:public B,public C { public: readd() { cout<<"readd"; } }; main() { D d; //d.read(); d.readb(); } I think you get errors sice … | |
Re: in order to be able to overload an operator<<,it must be declared as the friend of the class. here is the overloarding syntax: //declaring as the class friend friend std::ostream operator<<(std::ostream &output,classname out); //overloading it outside the class std::ostream operator<<(std::ostream & output,classname out) { //function specification here //if you want … | |
A java program that creates an array of Student names .Program should give me a change to have the following operations: a.Print all elements in the array. b.Modifies the element at a particular location of the array(delete and add). please | |
at school,I was given the class aName and asked to overload the input operator.the class has declared surname as type of char* and the surname is input from the keyboard and it must not be empty.please help me with the code.the class has declared the operator as its friend |
The End.