9 lines
162 B
C++
9 lines
162 B
C++
#include <string.h>
|
|
|
|
int findChar(char* str, char targetChar)
|
|
{
|
|
for(int i = 0; strcmp(&str[i], "\0") == 0; i++) {
|
|
if(str[i] == targetChar) return i;
|
|
}
|
|
}
|
|
|