kindly tell what is #pragma warning(disable: 4996) in the above program????and how can we cout the locations of each vowel in the sentence..
Builder_1
-6
Junior Poster in Training
Recommended Answers
Jump to PostThat's a microsoft compiler thing -- it supressed warning number 4996, which is a warning about deprecated functions. Just delete that line if you use another compiler.
how can we cout the locations
What do you mean by "locatins"? The vowel's position within the string? Such as there …
Jump to PostYou will probably have to use two arrays, one array for the letter and within that an array of each location number. Something like this.
struct location { char letter; vector<int> locationNumber; }; vector<location> locations_array;
The above assumes you have studied std::vector in your class. If …
Jump to PostI believe the integer
length
is holding the place of the vowel.
I don't remember exactly how strtok works or what exactly does it
return, but using it you will get the length of the word before the vowel
for all of the vowels by using …
Jump to PostI wouldn't use strtok(), just modify the code previously posted to keep track of the position of each vowel, the loop's i counter is the location within the string. Now all you have to do is add some arrays to save that value.
All 14 Replies
Builder_1
-6
Junior Poster in Training
Builder_1
-6
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Builder_1
-6
Junior Poster in Training
Builder_1
-6
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Builder_1
-6
Junior Poster in Training
Despairy
0
Light Poster
Builder_1
-6
Junior Poster in Training
Builder_1
-6
Junior Poster in Training
Builder_1
-6
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Builder_1
-6
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
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.