Thursday, March 10, 2011

C++ program to add two Complex no. using this pointer



#include<iostream>
using namespace std;
class Complex
{
private:
float real,imag;
public:
Complex():real(0),imag(0){}

Read more!

Thursday, March 3, 2011

C++ program that illustrates the order of constructor and destructor invocation in nice way



#include<iostream>
using namespace std;
class Dept{
    private:
        int id;
        char name[30];
    public:
        Dept(){}

Read more!