http://codepad.org/UZnNZCaq
The program contains prices for 5 products in 5 categories. The product's name and price are listed in variables. (integers and strings)
Once you select a category using getch(), it'll give you a list of products of that selected category. It will ask you for a price range, so you type the budget.
Entering the integer will cause the program to start listing down products of that category if the price is below the budget.
You'll notice that my program tries to achieve two other things:
- Making the processing part of the code short.
- Making products/category names easily replaceable.
The link also provides reasons that may have relations to the programs I'm getting but I don't understand it.
Two things I notice when I run the bugged up program:
- Integers for prices are treated as short int.
- Strings are not handled correctly.
I really need as much help as possible.
The program contains prices for 5 products in 5 categories. The product's name and price are listed in variables. (integers and strings)
Once you select a category using getch(), it'll give you a list of products of that selected category. It will ask you for a price range, so you type the budget.
Entering the integer will cause the program to start listing down products of that category if the price is below the budget.
You'll notice that my program tries to achieve two other things:
- Making the processing part of the code short.
- Making products/category names easily replaceable.
The link also provides reasons that may have relations to the programs I'm getting but I don't understand it.
Two things I notice when I run the bugged up program:
- Integers for prices are treated as short int.
- Strings are not handled correctly.
I really need as much help as possible.