I am trying to find a file type through the file extension. I am trying to use string tokenizer to get the file type. How do i use strtok. what i have done is

Code:
char * temp = strtok(filename, ".");
The things is how do i get the file extension by its self? Some files have '.' in the filename, but i am only interested in the last few characters after the last '.'

Any hints?

thanks