Category : c++

Email #include<iostream> using namespace std; class Shape{ public: virtual void drow()=0; }; class Rete : Shape{ public : void drow() { cout << “this main regtagularn”; } }; class Treal : Shape{ public: void drow() { cout << “this other shape of the comptern”; } }; class Book : Shape{ public : void drow() { ..

Read more

Email#include<iostream> using namespace std; class Anil{ public : void fun(int x) { cout << “the x alues of the function”<< x<< endl; } void fun(double x) { cout << “this coding wokring” << x<< endl; } void fun(int x, int y ) { cout << “this coding of the best”<< x << y << endl; ..

Read more

Email#include<iostream> using namespace std; class A{ public : virtual void add() { cout << “this main function coding”; } virtual void show() { cout << “this show of the codn main fn”; } }; class B : public A{ public : void add() { cout << “this sub codngn”; } void show() { cout << ..

Read more

Email#include<iostream> using namespace std; class Anil{ public : void fun(int x) { cout << “the x alues of the function”<< x<< endl; } void fun(double x) { cout << “this coding wokring” << x<< endl; } void fun(int x, int y ) { cout << “this coding of the best”<< x << y << endl; ..

Read more

Email#include<iostream> using namespace std; class A{ public : void data() { cout << “the values of the function”; } }; class B{ public : void setname() { cout << “this coding bealgrloe”; } }; class C { public : void setnamess() { cout << “this coding bealgrloe”; } }; class D: public A, public B, ..

Read more

Email#include<iostream> using namespace std; class A{ public : void setaname() { cout << “this coding aniln”; } }; class B : public A { public : void setdate() { cout << “this main codingn”; } }; class C : public A { public : void stenamest() { cout << “this about of the main coding”; ..

Read more

Email#include<iostream> using namespace std; class A{ public: void setname() { cout << “this my name”; } }; class B : public A{ public : void setdate() { cout << “this seicdn of the mane function”; } }; class C { public : void detele() { cout << “this workin of coding”; } }; class D ..

Read more

Email#include<iostream> using namespace std; class A{ public : void setname() { cout <<“this manin name”; } }; class B : public A{ public : void setdate() { cout <<“this data fo the class”; } }; class C : public B { public : void setage() { cout <<“thisma scextio f c”; } }; int main() ..

Read more

Email#include<iostream> using namespace std; class Book{ private : int age ; public : void namet(int iage) { this->age=iage; } void disp() { cout << this->age ; } }; int main() { Book anil; anil.namet(555); anil.disp(); r..

Read more

Email#include<iostream> using namespace std; class Father{ public : void setname() { cout << “this aniln”; } }; class Mother : public Father{ public : void setname() { cout << “n this codoingof the”; Father::setname(); } }; int main() { Mother naik; naik.setname(); r..

Read more

Email/* this method over wring class*/ #include<iostream> using namespace std; class Father { public : void setanil() { cout << “this is main class of the coding “; } }; class Mother : public Father{ public : void setanil() { cout << “this mohter class values of the coding”; } }; int main() { Mother ..

Read more

Email#include<iostream> using namespace std; class Father{ public : int hight; void setfather(){ cout << “this is the father coding class”; } }; class Mother{ public : string color; void setmohter() { cout << “this mother coding class”; } }; class Chlid : public Father, public Mother{ public : void setfather(){ cout << “this main of ..

Read more

Email#include<iostream> using namespace std; class Anil{ protected: string name; public : void stename(string iname) { name = iname; } }; class Book : private Anil{ public : void display() { cout << name; } void bookname(string iname) { stename(iname); } }; class Gsstud : public Book{ public : void displuw(string iname) { bookname(iname); } }; ..

Read more

Email#include<iostream> using namespace std; class Anil{ protected : string name; public : void setName(string iname) { name = iname; } }; class Book : public Anil{ public : void displ() { cout << “this is the public classn” << name; } }; int main() { Book naik; naik.setName(“anilnaikcodngn”); naik.displ(); r..

Read more

Email#include<iostream> using namespace std; class Anil{ protected: string name; int age; public : void setname(string iname) { name= iname; } void setage(int iage) { age=iage; } }; class Book : public Anil{ public : void display() { cout << name << age; } }; int main() { Book naik; naik.setname(“this codiong workingn”); naik.setage(12345); naik.display(); return ..

Read more

Email#include<iostream> #include<string> using namespace std; class Anil{ public : string name; int age; void setname(string iname) { name = iname; } void setage(int iage) { age=iage; } }; class Book : public Anil{ public : int id; void setid(int iid){ id=iid; } void desipyaly() { cout << name << age << id; } }; int ..

Read more

Email#include<iostream> using namespace std; class Anil{ string name; int age; public : Anil(string iname, int iage) { name = iname; age = iage; } void disp() { cout << name << age; } friend void displya(Anil man); }; void displya(Anil man) { cout << man.name << man.age; } int main() { Anil naik(“this mainof the ..

Read more

Email#include <iostream> using namespace std; class Anil{ public : static int anil_count; Anil(){ anil_count++; } void Total() { cout << “total values is” << anil_count; } static void Anilcount() { cout << “this static count function of the proigamog application”; } }; int Anil::anil_count = 0; int main() { cout << Anil::anil_count; Anil naik; naik.Total(); ..

Read more

EmailWhat is constructor? A constructor is a member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) create. It is special member function of the class.   #include<iostream> using namespace std; class Anil{ private : string name; int age; public : Anil(){ cout << ..

Read more

Emailprivate and public function suing small application her i am using the private value in the public place and her   #include<iostream> using namespace std; class Anil{ private: int age; float asc; void inputon() { cout <<“Input Onn”; } void inputoff() { cout << “Input offcn”; } public : void read(){ inputon(); cout <<“enter valuesn”; ..

Read more

EmailHow  to private access specifier using c++ #include<iostream> using namespace std; class Anil{ private: int age; int nj; int getAge(){ return age-5; } int sub() { return nj+100; } public : void display(); void setAge(int value) { age=value; } void kl(int value) { nj=value; } }; void Anil::display() { cout << Anil::getAge() << Anil::sub(); } ..

Read more

EmailThe C++ programming using Class programming   #include<iostream> using namespace std; class Anil{ public: string opp; void Display() { cout << “This coding opp” << opp; } }; int main() { Anil *dk= new Anil(); dk->opp=”nValue of the opp”; dk->Display(); return 0; }     out put:- This coding opp Value of the opp Process ..

Read more

Emailcpp Programming using while condition #include<iostream> #include<stdio.h> using namespace std; int main() { int name; int name2; int sum; cout << “testing coding”; cin >> name; cout << “testing codmign”; cin >> name2; sum = name + name2; while(sum > 5) { sum +=1; cout << sum; if(sum== 20) ..

Read more