SlideShare a Scribd company logo
class Array
{
    private:
        int size;
        int *pointer;

     public:
        Array()
        {
             size=0;
                           pointer=NULL;
       }

     void load()
     {
         cout <<"Enter the number of integers in the array.nn";
         cin >>size;
         pointer = new int[size];
         int i;
         for (i=0; i< size; i++)
         {
             cout <<"Enter interger # " << i+1 <<"n";
             cin >>*(pointer+i);


           }
                     }//end of load

     void print()
     {
        int i =0;
        cout <<"The array contains " <<size << "integers.nn";
        cout <<"They are:n";
         while (i < size)
            {
                cout <<i+1<<")t"<<*(pointer+i)<<endl;
                  i++;

               }//end of loop

       }

     ~Array()        //destructor to delete the array
     {
         delete []pointer;
     }

};

void main (void)
{
    Array array1;
    array1.load();
    array1.print();
    array1.~Array();
}

____________________________________________
Ad

More Related Content

What's hot (20)

Introduction to Go for Java Programmers
Introduction to Go for Java ProgrammersIntroduction to Go for Java Programmers
Introduction to Go for Java Programmers
Kalpa Pathum Welivitigoda
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++
Arun Nair
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - Harsh
Harsh Sharma
 
ProgrammingwithGOLang
ProgrammingwithGOLangProgrammingwithGOLang
ProgrammingwithGOLang
Shishir Dwivedi
 
week-5x
week-5xweek-5x
week-5x
KITE www.kitecolleges.com
 
Cpp c++ 2
Cpp c++ 2Cpp c++ 2
Cpp c++ 2
Sltnalt Cosmology
 
Array using recursion
Array using recursionArray using recursion
Array using recursion
Swarup Boro
 
Oopsprc1c
Oopsprc1cOopsprc1c
Oopsprc1c
Ankit Dubey
 
CODE Data Structures
CODE Data StructuresCODE Data Structures
CODE Data Structures
Sonia Pahuja
 
Program membalik kata
Program membalik kataProgram membalik kata
Program membalik kata
haqiemisme
 
Static Variable in C++
Static Variable in C++Static Variable in C++
Static Variable in C++
Nasir Hamidon
 
Include
IncludeInclude
Include
Shi Chakep
 
C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem
Topics MixeR
 
Cpp
Cpp Cpp
Cpp
Ankit Dubey
 
Ooprc4 b
Ooprc4 bOoprc4 b
Ooprc4 b
Ankit Dubey
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
Vikas Sharma
 
Functors, applicatives, monads
Functors, applicatives, monadsFunctors, applicatives, monads
Functors, applicatives, monads
rkaippully
 
Oop1
Oop1Oop1
Oop1
Vaibhav Bajaj
 
メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割
Koichiro Eto
 
cosc 281 hw2
cosc 281 hw2cosc 281 hw2
cosc 281 hw2
Brian Goggins
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++
Arun Nair
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - Harsh
Harsh Sharma
 
Array using recursion
Array using recursionArray using recursion
Array using recursion
Swarup Boro
 
CODE Data Structures
CODE Data StructuresCODE Data Structures
CODE Data Structures
Sonia Pahuja
 
Program membalik kata
Program membalik kataProgram membalik kata
Program membalik kata
haqiemisme
 
Static Variable in C++
Static Variable in C++Static Variable in C++
Static Variable in C++
Nasir Hamidon
 
C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem C++ question 6 || solution of Programming Problem
C++ question 6 || solution of Programming Problem
Topics MixeR
 
Functors, applicatives, monads
Functors, applicatives, monadsFunctors, applicatives, monads
Functors, applicatives, monads
rkaippully
 
メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割メディアアートにおけるプログラミング言語Rubyの役割
メディアアートにおけるプログラミング言語Rubyの役割
Koichiro Eto
 

Viewers also liked (20)

Autor do mês
Autor do mêsAutor do mês
Autor do mês
teresamferreira
 
Group Risk Assessment Form
Group Risk Assessment FormGroup Risk Assessment Form
Group Risk Assessment Form
t012588
 
Yoli planta(1)
Yoli planta(1)Yoli planta(1)
Yoli planta(1)
yolandaruizr
 
A beleza dos números
A beleza dos númerosA beleza dos números
A beleza dos números
profroberto2009
 
Presentación3.ppt
Presentación3.pptPresentación3.ppt
Presentación3.ppt
darymary
 
Boekenhouder evaluatie 1.2 b
Boekenhouder evaluatie 1.2 bBoekenhouder evaluatie 1.2 b
Boekenhouder evaluatie 1.2 b
JasmienDecancq
 
Cabo Coaxial DLC 58 - RF
Cabo Coaxial DLC 58 - RFCabo Coaxial DLC 58 - RF
Cabo Coaxial DLC 58 - RF
Alfacomp Automação Industrial Ltda.
 
Preguntas abuelo
Preguntas abueloPreguntas abuelo
Preguntas abuelo
inasadaba
 
Product Work Log
Product Work LogProduct Work Log
Product Work Log
Specter-kc
 
FOTOyMÁS
FOTOyMÁSFOTOyMÁS
FOTOyMÁS
fotoymas
 
Document11
Document11Document11
Document11
isteven
 
Lawspeed Awr Handout
Lawspeed Awr HandoutLawspeed Awr Handout
Lawspeed Awr Handout
Rickycoleman
 
Workshop Enunciados Gerais e Enunciados Específicos
Workshop Enunciados Gerais e Enunciados EspecíficosWorkshop Enunciados Gerais e Enunciados Específicos
Workshop Enunciados Gerais e Enunciados Específicos
Sílvia Baltazar
 
Hirlevel
HirlevelHirlevel
Hirlevel
JobbikLadany
 
Examiner new frontiers july 2011 page 1
Examiner   new frontiers july 2011 page 1Examiner   new frontiers july 2011 page 1
Examiner new frontiers july 2011 page 1
retreathouse
 
30 new products for our 30 years
30 new products for our 30 years30 new products for our 30 years
30 new products for our 30 years
Lika Electronic
 
2ª Fase - Nível 2 - 2011
2ª Fase - Nível 2 - 20112ª Fase - Nível 2 - 2011
2ª Fase - Nível 2 - 2011
oim_matematica
 
Dicas
DicasDicas
Dicas
srdimitrov
 
Group Risk Assessment Form
Group Risk Assessment FormGroup Risk Assessment Form
Group Risk Assessment Form
t012588
 
Presentación3.ppt
Presentación3.pptPresentación3.ppt
Presentación3.ppt
darymary
 
Boekenhouder evaluatie 1.2 b
Boekenhouder evaluatie 1.2 bBoekenhouder evaluatie 1.2 b
Boekenhouder evaluatie 1.2 b
JasmienDecancq
 
Preguntas abuelo
Preguntas abueloPreguntas abuelo
Preguntas abuelo
inasadaba
 
Product Work Log
Product Work LogProduct Work Log
Product Work Log
Specter-kc
 
Document11
Document11Document11
Document11
isteven
 
Lawspeed Awr Handout
Lawspeed Awr HandoutLawspeed Awr Handout
Lawspeed Awr Handout
Rickycoleman
 
Workshop Enunciados Gerais e Enunciados Específicos
Workshop Enunciados Gerais e Enunciados EspecíficosWorkshop Enunciados Gerais e Enunciados Específicos
Workshop Enunciados Gerais e Enunciados Específicos
Sílvia Baltazar
 
Examiner new frontiers july 2011 page 1
Examiner   new frontiers july 2011 page 1Examiner   new frontiers july 2011 page 1
Examiner new frontiers july 2011 page 1
retreathouse
 
30 new products for our 30 years
30 new products for our 30 years30 new products for our 30 years
30 new products for our 30 years
Lika Electronic
 
2ª Fase - Nível 2 - 2011
2ª Fase - Nível 2 - 20112ª Fase - Nível 2 - 2011
2ª Fase - Nível 2 - 2011
oim_matematica
 
Ad

Similar to Class array (20)

#include String.hpp#include ..Functionsfunctions.hpp.docx
#include String.hpp#include ..Functionsfunctions.hpp.docx#include String.hpp#include ..Functionsfunctions.hpp.docx
#include String.hpp#include ..Functionsfunctions.hpp.docx
gertrudebellgrove
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
Mouna Guru
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
 
Ds 2 cycle
Ds 2 cycleDs 2 cycle
Ds 2 cycle
Chaitanya Kn
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptx
JumanneChiyanda
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical file
Pranav Ghildiyal
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
PTCL
 
Data Structures asdasdasdasdasdasdasdasdasdasd
Data Structures asdasdasdasdasdasdasdasdasdasdData Structures asdasdasdasdasdasdasdasdasdasd
Data Structures asdasdasdasdasdasdasdasdasdasd
abdulrahman39ab
 
Opp compile
Opp compileOpp compile
Opp compile
Muhammad Faiz
 
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdfDoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
aathiauto
 
Structured data type
Structured data typeStructured data type
Structured data type
Omkar Majukar
 
a) Write the recursive function in C++ to sort a set of data using M.pdf
a) Write the recursive function in C++ to sort a set of data using M.pdfa) Write the recursive function in C++ to sort a set of data using M.pdf
a) Write the recursive function in C++ to sort a set of data using M.pdf
nageswara1958
 
Data Structures & Algorithms - Lecture 3
Data Structures & Algorithms - Lecture 3Data Structures & Algorithms - Lecture 3
Data Structures & Algorithms - Lecture 3
Faculty of Computers and Informatics, Suez Canal University, Ismailia, Egypt
 
Lecture-12 (Array of Objects) by hasnat.ppt
Lecture-12 (Array of Objects) by hasnat.pptLecture-12 (Array of Objects) by hasnat.ppt
Lecture-12 (Array of Objects) by hasnat.ppt
trickidagain
 
Fp201 unit4
Fp201 unit4Fp201 unit4
Fp201 unit4
rohassanie
 
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
arihantelehyb
 
Object oriented programming; operator overloading array
Object oriented programming; operator overloading arrayObject oriented programming; operator overloading array
Object oriented programming; operator overloading array
Syed Zaid Irshad
 
C++ practical
C++ practicalC++ practical
C++ practical
Rahul juneja
 
Cpp c++ 1
Cpp c++ 1Cpp c++ 1
Cpp c++ 1
Sltnalt Cosmology
 
Arrays in C++
Arrays in C++Arrays in C++
Arrays in C++
Kashif Nawab
 
#include String.hpp#include ..Functionsfunctions.hpp.docx
#include String.hpp#include ..Functionsfunctions.hpp.docx#include String.hpp#include ..Functionsfunctions.hpp.docx
#include String.hpp#include ..Functionsfunctions.hpp.docx
gertrudebellgrove
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
Mouna Guru
 
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdfC++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
 
Array and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptxArray and string in C++_093547 analysis.pptx
Array and string in C++_093547 analysis.pptx
JumanneChiyanda
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical file
Pranav Ghildiyal
 
Queue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked ListQueue Implementation Using Array & Linked List
Queue Implementation Using Array & Linked List
PTCL
 
Data Structures asdasdasdasdasdasdasdasdasdasd
Data Structures asdasdasdasdasdasdasdasdasdasdData Structures asdasdasdasdasdasdasdasdasdasd
Data Structures asdasdasdasdasdasdasdasdasdasd
abdulrahman39ab
 
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdfDoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
aathiauto
 
Structured data type
Structured data typeStructured data type
Structured data type
Omkar Majukar
 
a) Write the recursive function in C++ to sort a set of data using M.pdf
a) Write the recursive function in C++ to sort a set of data using M.pdfa) Write the recursive function in C++ to sort a set of data using M.pdf
a) Write the recursive function in C++ to sort a set of data using M.pdf
nageswara1958
 
Lecture-12 (Array of Objects) by hasnat.ppt
Lecture-12 (Array of Objects) by hasnat.pptLecture-12 (Array of Objects) by hasnat.ppt
Lecture-12 (Array of Objects) by hasnat.ppt
trickidagain
 
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
(Parent reference for BST) Redefine TreeNode by adding a reference to.pdf
arihantelehyb
 
Object oriented programming; operator overloading array
Object oriented programming; operator overloading arrayObject oriented programming; operator overloading array
Object oriented programming; operator overloading array
Syed Zaid Irshad
 
Ad

Recently uploaded (20)

LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
Cultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptxCultivation Practice of Turmeric in Nepal.pptx
Cultivation Practice of Turmeric in Nepal.pptx
UmeshTimilsina1
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 

Class array

  • 1. class Array { private: int size; int *pointer; public: Array() { size=0; pointer=NULL; } void load() { cout <<"Enter the number of integers in the array.nn"; cin >>size; pointer = new int[size]; int i; for (i=0; i< size; i++) { cout <<"Enter interger # " << i+1 <<"n"; cin >>*(pointer+i); } }//end of load void print() { int i =0; cout <<"The array contains " <<size << "integers.nn"; cout <<"They are:n"; while (i < size) { cout <<i+1<<")t"<<*(pointer+i)<<endl; i++; }//end of loop } ~Array() //destructor to delete the array { delete []pointer; } }; void main (void) { Array array1; array1.load(); array1.print(); array1.~Array();
  翻译: