CBFalconer wrote:
>
> alan wrote:
> >
> ... snip ...
> >
> > The function is stored in C:\temp\myfun.c
> > int func(){
> > return 1;
> > }
> >
> > The header file is stored in C:\temp\myheader.h
> > extern int func(void);
> >
> > in my main program, I got a problem if I include this header file
> > (myheader.h).
> > #include <stdio.h>
> > #include "C:\temp\myheader.h"
>
> Those backslashes are escape characters. \t means a tab char. \m
> is not defined, but most likely is taken as m. Either use forward
> slashes, or double the backslashes.
Nit-pick: The backslashes are *not* escape sequences,
and \t does *not* mean a tab character. The stuff between
the double quotes is a "q-char-sequence," *not* a string
literal.
6.4.7 Header names
/3/ [...] Similarly, if the characters ', \, //, or /*
occur in the sequnce between the " delimiters, the
behavior is undefined(6
6

Thus, sequences of characters that resemble escape
sequences cause undefined behavior.
The practical consequence is that the form of header names
is platform-dependent, and it's up to the platform to decide
what (if anything) to do with backslashes and the like. The
O.P.'s compiler may or may not accept them -- and doubling
the backslashes may or may not cure the problem.
--