V
velvetyuan
I'm not sure whether it is proper to post it here, but I regard it at
least has something to do with C++.
Let me try to clarify my problem:
I have two files: triangle.h,
triagle.c
I compiled the latter into triangle.obj using VC6.0, then added the
..obj and .h into my project, expecting them to work with other files.
but the most magic thing happened: if I called a function declared in
triangle.h from a .c file, it would work well, but if every line
codes remained the same with the file changed into an .cpp file, it
would tell that the function doesn't take right number of parameters.
the main part of the triangle.h is like this:
#ifdef ANSI_DECLARATORS
void triangulate(char *, struct triangulateio *, struct
triangulateio *,
struct triangulateio *);
void trifree(VOID *memptr);
#else /* not ANSI_DECLARATORS */
void triangulate();
void trifree();
#endif /* not ANSI_DECLARATORS */
I'm really confused with the ANSI_DECLARATORS, is it something
distinguishing between .c and .cpp?
I learned C++ as my first, and I know very little about C.
I will really appreciate if you offer some help. Thanks a lot!
least has something to do with C++.
Let me try to clarify my problem:
I have two files: triangle.h,
triagle.c
I compiled the latter into triangle.obj using VC6.0, then added the
..obj and .h into my project, expecting them to work with other files.
but the most magic thing happened: if I called a function declared in
triangle.h from a .c file, it would work well, but if every line
codes remained the same with the file changed into an .cpp file, it
would tell that the function doesn't take right number of parameters.
the main part of the triangle.h is like this:
#ifdef ANSI_DECLARATORS
void triangulate(char *, struct triangulateio *, struct
triangulateio *,
struct triangulateio *);
void trifree(VOID *memptr);
#else /* not ANSI_DECLARATORS */
void triangulate();
void trifree();
#endif /* not ANSI_DECLARATORS */
I'm really confused with the ANSI_DECLARATORS, is it something
distinguishing between .c and .cpp?
I learned C++ as my first, and I know very little about C.
I will really appreciate if you offer some help. Thanks a lot!