Hello guys, i would like to ask you about c++ language. have an assignment and i want to do a movement for?
i another questions, the hero should for example take a bomb to destroy the wall , hoe can i disply a message to show the user that what he\she should to do? somebody told me by loop but i couldn't understand : ( please help me and i apologise because my english isn't very well waiting for youi have an assignment and i want to do a movement for the hero which will be controled by the keyboard another questions, the hero should for example take a bomb to destroy the wall , hoe can i disply a message to show the user that what he\she should to do? somebody told me by loop but i couldn't understand : ( please help me and i apologise because my english isn't very well waiting for you
Recommended Answers
Jump to Post>>hoe can i disply a message to show the user that what he\she should to do?
Maybe by displaying the required insturctions on the screen using stdout. Maybe something like this?
cout << "You now have a bomb that can be used to blow up a wall."
…
Jump to PostThere is much more information, for example what options does the user have, what instructions are desired, etc, needed before I could do anything vaguely resembling your request. In general it might end up something like this, though:
bool doMore = true; while(doMore) { display options here …
Jump to Postif he\she press 'w' so the hero must move up, the qustion how to do this by using loop?
How about this? Getting the user input and then doing whatever required to move using a switch()?
bool doMore = true; char input; while(doMore) { cout << "Choose …
Jump to PostAre you asking us to write it for you? Or are you asking us to help you correct your code that doesn't work?
If the first, forget it. We are not a coding service.
If the second, great. But we aren't psychic and can't tell what you tried that …
All 14 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.