+ 1

How do I access a C++ struct vector from function main(); [solved].

The class object method getExp() should be accessed from function main(), how do I access it without getting errors? https://code.sololearn.com/ckyk9mlt7VN3/?ref=app

8th Jun 2021, 2:31 PM
Infinite
Infinite - avatar
3 Respuestas
0
Try this : vector m = st.getExp(); vector <k> is not matching with empty <a> vector object. You can remove empty structure now.
8th Jun 2021, 2:50 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna🇮🇳 thanks very much for the answer. Actually, I didn't know vectors could be defined this way.
8th Jun 2021, 2:52 PM
Infinite
Infinite - avatar
+ 1
You're welcome..
8th Jun 2021, 2:55 PM
Jayakrishna 🇮🇳