
April 23, 2010
2:33 a.m.
Mike Meyer wrote:
If the user typed the filename "foo.c" and I am trying to decide if it has the ".C" extension. If "foo.C" exists on the disk and the user knows that "foo.c" and "foo.C" are the same file, it's reasonable for the user to expect the application to figure out that this file has the ".C" extension, even though they typed ".c".
But you don't know whether the user is expecting this. If he knows that gcc distinguishes between .c and .C, it may be that he is expecting foo to be compiled as a C file rather than C++, and he made a mistake when he named the file foo.C. -- Greg