prog.cpp:37:12: error: comparison between pointer and integer ('char *' and 'int')
while(p1 != '\0'){
~~ ^ ~~~~
prog.cpp:40:9: error: no matching function for call to 'strtok'
p1 = strtok('\0'," ");
^~~~~~
/usr/include/string.h:343:14: note: candidate function not viable: no known conversion from 'char' to 'char *__restrict' for 1st argument
extern char *strtok (char *__restrict __s, const char *__restrict __delim)
^
prog.cpp:44:12: error: comparison between pointer and integer ('char *' and 'int')
while(p2 != '\0'){
~~ ^ ~~~~
prog.cpp:46:10: error: no matching function for call to 'strtok'
p2 = strtok('\0'," ");
^~~~~~
/usr/include/string.h:343:14: note: candidate function not viable: no known conversion from 'char' to 'char *__restrict' for 1st argument
extern char *strtok (char *__restrict __s, const char *__restrict __delim)
^
4 errors generated.