Hey guys, im having a problem here, i need to make script that uses structure, but i need to enter struct information from the command line. By the way im doing it as menu type.
also you have a spelling error in your struct declaration: string tree;
also you need a few closing braces at the end (unless you haven't posted the full thing)
also you need a 'while' to accompany your 'do' (again, unless you haven't posted the full program).
also, consider using sensible names for class, structs, methods and variables. Things like "okey", "one", "two", "three" will not be helpful when you come to debug your code.
That's because okey is still defined as j as well.
1 2 3 4 5 6
okey j; // struct okey
for(int j = 0; j < n; j++) // local int j is incremented
{
cout << "one: ";
getline(cin,j.one); // local variable j is not a struct or union, it is an int so this is in error
There are more errors, but I think it's important for you to understand how the scope of variables effects you. At the very least do not use the same variable name both globally and locally as it can be confusing.