• Lessons
    • Software Eng
    • Technology
    • Comp.Neworks
    • Learn
    • Comp.Languages
    • CRM
    • JDBC RMI and ASP
    • Linux Commands
    • iOS
    • Andriod
    • COA
    • BI
    • Data Science
    • Commerce
  • Serivces
    • Calculater
    • Mean,Medium,Mode
  • Happy Tips
    • Be Happy
    • Why do we get hurt
    • Carrer-Life
    • Carrer where?
    • Do not worry
    • What is success
  • Jobs
    • Carrer Tips
    • Job Links
  • Scribbles
    • Video: 1) KoelPaPaya
    • 2)Bamboo Train-Cambodia
    • 3)SahasraLinga-Cambodia
    • 4)Banana Bud Dish-Delicious
    • GolGumaz
    • CuChi:Vietam
    • Heritge-Combodia
  • Just
    • Health-Tips  
    • Innovation Index
    • Top 10
    • Tribute-To-Inventor
    • e-Resources
    • Tips for you
    • A tribute to Mouse-Inventor
    • Cyber Security-new trend
    • DMS-ICube?
    • Java Programs
  • Learn
    • Raspberry Pi
    • Python
  • eBook Shelf
  • Contact



//Sample Program to demonstrate the use of Array and Pointer

# include < iostream.h >
#include < conio.h >
class person
{
protected: char name[40];
public:void setname(void)
  { cout << "\n\n  Enter name: ";
    cin >> name;
  }
void printname(void)
  {
   cout << "\n Name is : " << name;
  }
};
   void main(void)
   {
    person* persptr[100];
    int n=0;
    char choice;
    clrscr();
 do {
    persptr[n]=new person;
    persptr[n]-> setname();
    n++;
    cout << "\n\n  Enter  another (y/n)? ";
    cin >> choice;
    } while(choice=='y');
    for(int j=0;j < n;j++)
    {
    cout << "\n Number  : " << j+1;
    persptr[j]->printname();
    }
    getch();
  }
Click here to go back.

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus








Footer1

About us

We are here to provide help to the self learners. All data and information provided on this site is for informational purposes only. Please look at Disclaimer too.


See More

Disclaimer

All data and information provided on this site is for informational purposes only. The information is provided to help the self learners. http://www.lessons2all.com makes no representations as to accuracy, completeness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use.
Content by: Dr Vishwananth Pai M, Udupi, Karnataka, India
Email: m.vishwanath.pai@gmail.com

  • Home
  • Lessons
  • Top