vowel removal challange...what is it thats not working

Posted 08 October 2012 - 07:35 AM

im supposed to do this using c_string, pulling out each chatacter and checking it, i figured it would be easier this way and then sussed out c_string but it doesn't work, i havnt completley sussed out errase and how to use an array of chars and find the length (size of?)i havnt played with vectors yet either, im very much the beginner and i appreciate the kind of help that gives one hints over the answer but that can be hard to do...thanks for checking this out guys =)

Re: vowel removal challange...what is it thats not working

Posted 08 October 2012 - 10:46 AM

devonrevenge, on 08 October 2012 - 11:26 AM, said:

no this still dont work

...

devonrevenge, on 08 October 2012 - 01:35 PM, said:

you dont need to know the code

If you are going to ask for help here, you need to understand & respect the fact that questions being asked (although you may not understand) are being asked for a reason. We're not going to be able to properly troubelshoot your code without your assistance. Description alone doesn't tell us 100% of what's wrong, & just because you perceive it one way doesn't mean that's the issue.

Please be mindful of those experienced in the languages you are asking for help with.

Re: vowel removal challange...what is it thats not working

You still didn't tell us what is not working. What inputs are you giving, what output are you seeing, and what output were you expecting to see?

Just glancing at your code, and assuming you just changed the greater than to a less than comparison on line 18, then the next thing that looks very wrong are these lines:

string1.replace(q,q+1," ");

Parameter 2 is the number of characters to be replaced. So that line of code says: starting at the q-th element, replace q+1 elements with the string " ". All you want to do is just replace a single character, not q+1 characters.

Re: vowel removal challange...what is it thats not working

Posted 08 October 2012 - 02:31 PM

If you don't want any help your answers are really helping. If however you do desire help then it is imperative that you provide the information requested. You have been given several suggestions and as far as I can see you haven't even tried any of these suggestions. So post your code and explain why the suggestion didn't help. You do this by showing what you have inputted into the program and showing the output the program is producing, if the program compiles. If it doesn't compile then provide the complete error messages exactly as they appear in your development environment. When you describe why the suggestions didn't work try to explain the reasons in proper English.

Re: vowel removal challange...what is it thats not working

you guys are so mean and free with your demoralizing bad reputation points...

kay here goes anyways, it compiles just i get the error message 'program ended in an unusual way' and thas it.

i also set the arrow to the other side and tried a whole load of deleting/replacing and erasing commands, i dont believe it could be the only flaw in the code but then im a complete novice worst than that im a complete novice with a bad reputation

....i only didnt want to copy and paste cos all the bloody numbers up the side have to be deleted...its not like i could ask you guys to ignore them without getting exiled now is it...now i have to learn to program with the albatross of a bad reputation hanging round my neck, you guys will look down on me forever from your ivory towers of programming knowledge and experience why not even my mother looks at me in the same way anymore...and my dad, he says he still loves me like the son he never had...whats that even mean?

Re: vowel removal challange...what is it thats not working

Everyone is mean? It depends on your perspective. We're here to help people who want to learn. This usually involves gentle prods and encouragement, but hard cases sometimes require more than a prod to get them going. What's really mean is just giving someone the answer, because then they learn nothing and the next assignment will be than much harder.

Also note that erase probably doesn't behave the way you think it does. Once you've removed your character and shortened your string by one, you might what to reconsider always moving q forward.