Archived

This topic is now archived and is closed to further replies.

X_Breaker

A problem with header files...

Recommended Posts

Here's the setup (thus far): I have two source files, and one header file. In one source file, I have a function, "DirectX_Init()" and in the other source file, I have a call to the aforementioned function. I also declare it as an extern in the header file. But, I'm getting redefinition errors for the variables in the function. The function itself, as listed in the source file: int DirectX_Init(void* parms = NULL, num_parms = 0) { // code } The call to the function in the other source file: DirectX_Init(); And finally, the function as listed in the header file so that it can be called: extern int DirectX_Init(void* parms = NULL, num_parms = 0); Upon compiling, I get the following two errors: error C2572: 'DirectX_Init' : redefinition of default parameter : parameter 2 error C2572: 'DirectX_Init' : redefinition of default parameter : parameter 1 How do I fix this? Edited by - X_Breaker on February 6, 2002 2:49:12 AM

Share this post


Link to post
Share on other sites