can anyone help me write the code for the below situation using c-string? i'm cracking my head wif tis.....
write a program that searches for a TV channel. A user may enter any of the following strings: TV1, TV2, TV4 or TV5. It does not matter if a user search channel as in figure 1. However if a user enters a wrong string, then message "Wrong Channel" will be displayed.
Figure 1: possible output for TV channel search
TV1- CHANNEL 1
TV2- CHANNEL 2
TV3- CHANNEL 3
TV4- CHANNEL 4
TV5- CHANNEL 5
kiong
0
Newbie Poster
Recommended Answers
Jump to PostYou will need cin, cout, printf(%s, "a std::string".c_str()). Read the documentation about it.
Looks like an assignment. Good luck. Design your program before attempting to code.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.