How to create and fill in an array of a C++ structure? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to create and fill in an array of a C++ structure?

How to create and fill in an array of a C++ structure? https://code.sololearn.com/cBUb4287uuTR/?ref=app

23rd Sep 2022, 6:10 PM
VirusZ
VirusZ - avatar
1 Answer
+ 1
Declare it as pointer. Student *s1[10]; s1[0] = new Student(name[0], 4); s1[0]->display();
23rd Sep 2022, 6:42 PM
Jayakrishna 🇮🇳