This program displays different types of object in c++ using constructor. I have attached a snapshot of the output. In the output, why isn't there a message displayed for the creation of the extern object?
//Program to illustrate different type of objects
#include<iostream.h>
#include<conio.h>
#include<string.h>
class diffobjs{
public:
char msg[10];
diffobjs(char ar[]){
strcpy(msg,ar);
cout<<"\nObject created of type "<<msg;
}
~diffobjs(){
cout<<"\n"<<msg<<" object destroyed";
getch();
}
};
extern diffobjs d1("Global");
void main(){
clrscr();
diffobjs d2("Automatic");
static diffobjs d3("Static");
getch();
}