answersLogoWhite

0

std::string test ("The cat sat on the mat");

std::string vowels ("aeiouAEIOU");

size_t pos = test.find_first_of (vowels);

if (pos != test.npos)

std::cout << "Vowel found at position " << pos << std::endl;

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

How do you find a vowel in given string?

#include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; void main() { char string[]="anystring"; int i=0,j,count=0; j=strlen(string); while(i!=j) { if(string[i]=='a'string[i]=='e'string[i]=='o'string[i]=='u'string[i]='i') count++; i++; } }


How do you write a program to find the no of words in a given string in dot net?

You find a language that can be targeted towards the .NET Framework. What you are suggesting is something related to string manipulation and you can work with delimiters.


Find out the square root for that given number using string?

Halv that given number,Make a square that has that half number as the length of a side.Stretch the string across the diagonal of the square from corner to corner.The length of the string is the square root of the given number


Do I need to write a program to find a substring in a given string in c plus plus?

No.


How do you write c programme to find proper subset of a given string?

you can use strstr()


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


How do you find the no of characters and numerics in the given string?

First of all numbers are not meant to be stored in a string and if u do so in C, these numbers will be treated as characters and you can not perform any calculation on these numbers, and to find the number of characters in a string use the strlen() from the string.h file.


Wap in c plus plus to find out the string is palindrome or not in?

use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.


How did Theseus find his way out of the labyrinth after killing the Minotaur?

Theseus used a ball of thread/string to find his way out. This was given to him by the princess Ariadne.


What did Theseus use to find his way out of the Labyrinth?

ANSWERTheseus was given a ball of thread by Princess Ariadne who told him to unravel it as he penetrated into the Labyrinth, so he knew the way out after he killed the Minotaur.


Who gave theaseus the string?

Theseus was given the string by Ariadne, the daughter of King Minos of Crete. She provided him with the string to help him navigate the Labyrinth after he defeated the Minotaur. By tying one end of the string to the entrance and unwinding it as he ventured inside, Theseus was able to find his way back out safely.


What is th function of the charindex?

The CHARINDEX function in SQL is used to find the position of a specific character or substring within a string. It returns the starting position of the substring or character within the given string.