LOTS of problems.
1) You're defining a structure inside your Main method. This will make any instance of this structure only possible and only visible inside the Main method.
2) Those char arrays will only hold 4 characters, not the 5 and 6 character strings you have in your "initializers". Yes, there is another, invisible null character at the end of each string of characters.
3) You've got arrays for your integers, but that doesn't appear as what you're really trying to do. You seem to be trying to create an array of structure instances. You don't put the arrays inside the structure. You create an array of structures instead, each will have two strings of 3 characters or less and two integer values.
4) The prints at the end of the code are probably going to display something that you're not intending. You seem to be either wanting individual strings but you're getting partial strings.
5) In your "initializers", you cannot refer to variable names. The values you supply have to cover every field and be provided in the order that they show up in the structure:
str select2 = {
"lely", "sara", { 30, 70, 20, 10 }, { 1, 2, 3, 4 }
};
6) When you use the
struct
keyword, you're defining a new structure. Your
struct str select
is a very bad attempt at re-defining the str structure.
And that's just for starters... Your code is so bad everywhere, it makes it impossible to try to figure out what you're really trying to do and what the structure should look like.