How can i do something like this? why this is showing error
Https://ide.codingblocks.com/s/300231
Modified code
s.insert({name[i],{price[i],weight[i]}});
this is correct one as price[i] and weight[i] are pair also
if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like
: and don’t forgot to mark doubt as resolved 
1 Like