[ create a new paste ] login | about

Link: http://codepad.org/enzx857P    [ raw code | output | fork ]

C++, pasted on Dec 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>
#include <wchar.h>
#include <string.h>
#include <locale.h>

int main(int argc, char* argv[])
{
	setlocale(LC_ALL,"Russian");

	wchar_t str[256] = L"привет!!!";

	wchar_t pchars[] = L"ауоыиэяюёе";
	for (int i = 0; str[i] != '\0'; i++)
		if (wcschr(pchars, str[i])) printf("%d ",i);

	printf("\n");

	return 0;
}


Output:
1
2 4 


Create a new paste based on this one


Comments: