was just wondering if anyone can help me with some homework. I have been trying to figure this out for a couple hours now. I am sure it is probably simple but I can't get it to run. What I have to do is take user input that contains the word HELL, and censor it to HECK. It needs to know that it is the word HELL and not something that contains it like HELLO. Also, we are not allowed to use the header <string>. This is just a small part of the whole homework so it needs to be a function. Thanks for Helping!!
Rmaure
0
Newbie Poster
Recommended Answers
Jump to PostLook at each character. When you see an H remember it. If the next letter is E, remember it, else forget everything. Continue until you have all the letters. Now check if there is a letter before or after these letters. If so, ignore it all, otherwise, change the characters
Jump to Postmore irritant thing is that what you're asking has less matter with c++ and more with logic, you should really try harder, it's not so complicated
All 5 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Rmaure
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
dospy
51
Junior Poster in Training
Ancient Dragon
commented:
agree
+17
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.