Posts by Kraut • 11 points
1 post
-
1
votes1
answer30
viewsA: How to create multiple objects from a struct having its user-defined values ( Pointers and Malloc)
You could use vector(array): Produto produtos[100]; So you’d log on produtos[0], produtos[1], etc.... Or, since you’re using pointers, you could create a chain list: struct produto { char nome; int…