10 lines
162 B
C++
10 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;
|
||
|
}
|
||
|
}
|
||
|
|