Thank you man!
I always have problems remembering what's illegal and what not!
I tried what you told me asap but and now I only get errors in the load function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
char load (scaffale numero[], int dim)
{
for (int i=0; i<dim; i++)
{
cout<<"Insert the product's name"<<endl;
cin>>numero[i].nomeProdotto;
cout<<"Insert the product's Manufacturer"<<endl;
cin>>numero[i].produttore;
cout<<"Insert the quantity"<<endl;
cin>>numero[i].quantity;
cout<<"Insert the price"<<endl;
cin>>numero[i].prezzo;
}
}
|
The errors this time being:
[Error] 'scaffale' was not declared in this scope
[Error] expected primary-expression before 'int'
[Error] expression list treated as compound expression in initializer [-fpermissive]
[Error] expected ',' or ';' before '{' token
I've tried a couple things but some resulted in the earlier errors replacing these so I'm guessing this is the right path?
In case you're curious, this program loads a shelf, with itemname, manufacturer etc and then sorts it by price, (I could work on an elaborate sort but I'm not confident on that)
Maybe later on I'll add the creation of a file and storage of the information in plain text, but I have enough problems as it's now.
Edit:Ok I removed dim (for some reason I forgot that) and ended up only with the 'scaffale' was not declared in this scope and expected ; before { token
I'm not sure what I'm supposed to do to be honest
Thank you again for your time!