#include<iostream.h> #include<conio.h> #include<string.h> #include<alloc.h> class source { char label[10]; char mnic[15]; char op[10]; public: char* getdata() { cin>>label>>mnic>>op; return strdup(mnic); } char* display() { cout<<"\n"<<label<<"\t"<<mnic<<"\t"<<op; return strdup(mnic); } }; class symtab { }; int main() { clrscr(); source obj1[15]; char *sptr; int i=0; do { sptr=obj1[i].getdata(); i++; }while((strcmp(sptr,"end"))!=0); i=0; do { sptr=obj1[i].display(); i++; }while((strcmp(sptr,"end"))!=0); getch(); free(sptr); return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)