Membri Statici In Clase

  • Uploaded by: Patrick Johnston
  • 0
  • 0
  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Membri Statici In Clase as PDF for free.

More details

  • Words: 172
  • Pages: 1
Membrii statici – Static Members [class.static] #include class Date { int d, m, y; static Date default_date; /*O variabila care este parte a unei clase, dar nu al unui obiect din acea clasa, este numit "static member", membru static. Este exact o singura copie a unui membru static in loc de o singura copie per obiect, cum se intampla cu membrii non-statici obisnuiti*/ public: Date(int dd=0, int mm=0, int yy=0) { d=dd?dd:default_date.d; m=mm?mm:default_date.m; y=yy?yy:default_date.y; } void add_date(int dd, int mm, int yy) { d=dd; m=mm; y=yy; } void print_date() { cout<<"day "<

Related Documents

Clase
November 2019 80
Clase
June 2020 45
Clase
June 2020 39
Clase
May 2020 40

More Documents from ""