Hello I am writing a program which prints out information from a file depending on what input the user gives. But I have a problem with one function. First of all I get an error which says that a variable or field is declared void. This is in my displayitems function. I assume that it has something to do with my parameter. Secondly: In my main function I get the error in my if statement that displayItems has to many arguments.
Ok , I have another problem. The program starts with giving you 4 numbers you should enter, described in my getWhatTheyWant function.
Subsequently you have to enter a number. Every number has it own specific items. The first time it shows the right items. However, If I enter a different number the program gives me the same items as it did in the first run. Despite the fact that is a different number.
My code;
Ah, ok. So can't just write execute function without assigning it again to my variable. If I just would let the code execute it would give me the number and the output of that function. But why won't it run disPlayItems?
Or atleast show something on the screen.
Wow, I fully understand it now haha. Update was the keyword.
Thank you!
Programming can be really frustrating, but I really want to learn it before I go enroll into university computer sience. Does it ever get easy?