Compiler output
prog.cpp:4:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
const char quest = "Yardi" ;
^
prog.cpp: In function 'int main()':
prog.cpp:9:6: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(txt) ;
^
prog.cpp:9:14: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(txt) ;
^
prog.cpp:10:26: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
if( strstr(txt,quest)) cout << "YES" << '\n' ;
^
In file included from /usr/include/c++/4.9/cstring:42:0,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:48,
from prog.cpp:1:
/usr/include/string.h:329:1: note: initializing argument 2 of 'char* strstr(char*, const char*)'
strstr (char *__haystack, const char *__needle) __THROW
^