Okay so Ive been exercising my C++ skills a little bit lately and I have gone about making a soda machine. Its gone great. But when I had my friend test it out. they wanted to buy another soda. I hadnt yet thought of that but when they suggested it, I started implementing it. (Im sure there was a simpler way of doing so) So I had started doing it and finally got it to work. But there was one thing bugging me. I couldnt get the value of the variable "balance" or "new_balance" or "new_balance2" to stay the way it was when it changed. For instance. I would buy a coke and then it would deduct an amount from my balance. Then it would ask me if I wanted to buy again. I would say yes. and buy a pepsi, but nothing was deducted from my balance that was originally deducted. My balance was reset and it only deducted from 10, not from the changed balance. If you guys can understand what Im trying to say, then can someone help me? I think its because I need to initialize a pointer to the balance variable. But Im not sure.
Hello FrankMcDonald, You have chosen some very strange ways of achieving your second cola option the user should be able to buy as much soda as they wish as long as their balance has sufficient funds. there is a very simple way of achieving this in what is called a while loop. for example
how can i put animation my word ("bpsu") that is moving from the left to the right and
("bpsu") from the right to left using stdio.h,conio.h,iostream.h,dos.h tell me what to do i cant make moving that words on c++ please help me
thanks advance .
how can i put animation my word ("bpsu") that is moving from the left to the right and
("bpsu") from the right to left using stdio.h,conio.h,iostream.h,dos.h tell me what to do i cant make moving that words on c++ please help me
thanks advance .
Well i did Experiment with dos in c++ using turbo c++ 3.0 inside of dosbox. I had a graphics library, but i do not remember the name of it just google c++ dos graphics library i am sure you will find something... also open gl is an option if you're up for the challenge XD. I was alble to create small bitmap sprites using the library i had to create a small 2d skyrim game that i played in dosbox on my andriod. you can do some pretty neat things in dos... its just really hard to learn. Good luck
@NoviceNate333 Thanks a lot Nate ;) I completely forgot about enum and switch functions. Im a little rusty. Only 14 years old. I learned a lot about C++ about a year ago and decided to pick back up on it now. Having some trouble right now but thanks for your help :)