Saturday 9 July 2016

Repeat Again any Sentence/Paraghraph........ 

#include <iostream>
#include <conio.h>
using namespace std;
class count{
private:
int serial;
static int num;
public:
count(){
num++;
serial=num;
}
void reportSerial(){
cout<<"I'm Object Number "<< serial << endl;
}
};
int count::num=0;
int main(){
count f1,f2,f3;
f1.reportSerial();
f2.reportSerial();
f3.reportSerial();
}

No comments:

Post a Comment