#include "stdafx.h" #include <iostream> #include <conio.h> using namespace std; #define N 4 struct mystruct { int pp_num; char *fio; char *mark; int groupe_num; }; int main() { mystruct a[N]; a[0].pp_num = 1; a[0].fio = "Yarmolenko AA"; a[0].mark = "4,5,5,3,4"; a[0].groupe_num = 12; a[1].pp_num = 2; a[1].fio = "Pyatov AV"; a[1].mark = "3,4,5,4,3"; a[1].groupe_num = 23; a[2].pp_num = 3; a[2].fio = "Shevchenko AM"; a[2].mark = "4,3,4,2,4"; a[2].groupe_num = 34; a[3].pp_num = 4; a[3].fio = "Garmash DH"; a[3].mark = "3,5,3,4,4"; a[3].groupe_num = 43; for (int i = 0; i < N; i++) { char c[2] = "2"; char *b; b = strpbrk(a[3].mark,c); if (b!=NULL) { cout << a[i].fio << endl; cout << endl; } } _getch(); return 0; } should bring out the name Shevcenko but does not work I can not figure it out