#: 4359 S3/Languages
14-Jun-90 06:15:07
Sb: #help with 'c' index()
Fm: SCOTT HOWELL 70270,641
To: all
Help!!!!! Will some one help me this is 'mysterous' C function called index().
Here is what the Microware 'c' compiler says about index()
synopsis
char *index(ptr,ch)
char *ptr;
ch
index() returns a pointer to the first occurence of the character ch in the
string pointed to by ptr. Returns null if char not found.
What I want to do is to print an integer indicating the location of that ch (ie
it would print the integer '3' for 'm' in 'computer'.)
Could someone write a small program that does this. The example in the manual
makes abs no sense.
There is 1 Reply.
|