hmm, I guess i'am lost. Most of this is my partners code and i'am just trying help him fix it. This is a programming 2 project but i haven't coded C++ in over a year so I barely remember anything. Thats why i'am having troubele figuring out whats wrong. I think I have to change somthing with...
And the weird thing is that it doesnt change the amount thats in the inventory eventhough it says "inventory updated" for the "S 100 1". The sell_purchase function is responsible for updating the inventory, but i dont know why it would display "inventory updated"...
Now with && I get this:
You will first be prompted for the inventories for each of the four brands.
You should then enter the initial number of cases available for each brand.
All other commands should follow one of these formats:
(P)urchase + <brand number> + <amount>.
(S)ell + <brand...
Ok so it runs but, it gives me an invalid error when I type in 1,2,3, or 4.Why is that? its like its not even entering the if loop int get_action.
here's a copy of the sample run:
You will first be prompted for the inventories for each of the four brands.
You should then enter the initial...
I only want it to enter the loop if its not 1,2,3,and 4. If I use == then wouldn't it enter the loop if the input is 1,2,3, or 4?
And one more question; I can't seem to get the paranthesis right! do i need to add more or take some away?
Thanks for the speedy reply!
Here's my program. It compiles, runs but there's a bug in it.
It has to do with the function get_action; the problem is in the OR statements :
Brand_number!=('1'))||(Brand_number!=('2'))||(Brand_number!=('3'))||(Brand_number!=('4')))
It just doesn't work. The brand number has to equal...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.