Report question

Question: How can I tell if a given path is a directory or a file? (C/C++)