- Joined
- Aug 10, 2001
- Location
- Cali
Hello, Im currently taking a C programming course. For our last project we had to make a very simple program that gave the user some choices that they could select. The chioces all had some numerical data that was totaled and printed out at the end of the proggy. It was linear and was composed of nothing but if-then statements and the like (no functions, everything was in main). Okay, so now we have to change (or in my case start over) our program so that the user can change the amount of their previous selections and call-up/display the choices and there corresponding data at any time (so basically i will keep a running total if you will). I want to use array's but I can't have characters and integers in the same array. okay, so HERE is the question. How would I be able to make a 'data table' if you will that allows me to link the names (in one array) to its numerical data (in a second array) and be able to store that info away once the user selects the items so that it can be recalled, totaled, and displayed at a later time? There are 4 seperate pieces of numerical data that go with each name I will have in the first array. Sorry if that was long but I had to explain a lot to get to that one question. I really want to be able to implement array's and several functions (it would be good practice) but i can't until i can get around that one hurdle. Thanks for the help in advance. Oh and yes my teacher said I could use ANY resource...even the oc.com forums (which he thinks is cool btw). K later.