All pastes #2097026 Raw Edit

Mine

public text v1 · immutable
#2097026 ·published 2011-12-28 17:17 UTC
rendered paste body
illustrate.h


#include <iostream>
#include <string>

class illulstrate
{
    public:
        static int count;
        void print() const;
        void setX(int a);
        static void incrementY();

        illustrate(int a = 0);
    private:
        int x;
        static int y;
};



illustrateImp.cpp

#include <iostream>
#include <string>
#include "illustrate.h"

using namespace std;


int illustrate::count = 0;
int illustrate::y = 0;

void illustrate::print() const
{
    cout << "x = " << x << ", y = " << y
         << ", count = " << count << endl;
}
void illustrate::setX(int a)
{
    x = a;
}
void illustrate::incrementY()
{
    y++
}
illustrate::illustrate(int a)
{
    x = a;
}