   "member function already defined or declared"
  I''m getting the "member function already defined or declared" error when I know it can''t be that. I mean, my header and cpp are fairly standard for class in question, i.e.//header fileclass A{   public:   A( ...args... );};//cpp file#include "header.h"A::A( ...args... ){   ... init ...}  so I assume it has to be something else confusing the compiler, but the question is what. I know something pretty bad has to be wrong because when I use the scope resolution operator (i.e. A:: ) in the cpp it doesn''t come up with the contents of A. I''d expect that sort of behavior if my class wasn''t defined properly, or if it couldn''t find the header file, but I''ve double checked those and they seem fine.Has anyone experienced this sort of problem before or know what could be causing it? I do include a bunch of other classes in A''s header, but even when I stop including them the problem persists, so I''m out of ideas. Oh yeah, I also tried changing class and file names but that didn''t help.
  Post an actual, minimal, example that produces that error.   “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”    — Brian W. Kernighan (C programming language co-inventor);  That''s the problem, I don''t know what''s wrong. But if you want to know the error that''s being REPORTED (even though I''m convinced that''s not the REAL error), then an example would be:// C2535.cppclass C {public:   void func();   // forward declaration   void func() {   // C2535, delete the forward declaration to resolve   }};int main() {} ;quote:Original post by Silex  // C2535.cppclass C {public:   void func();   // forward declaration   void func() {   // C2535, delete the forward declaration to resolve   }};int main() {}   The compiler was correct. You declare func() twice. ;  That was just an example (not from my program) of code that causes the reported error. ;  The function declaration within the class is not even overloaded...So if you want to declare and define the function in the class, then why not just write the function out instead of having the declaration twice within the class? You can declare in the class and do the definition outside the class with the :: operator.   EDIT: I think it boils down to you actually posting a real snippet of the class instead of your abstract code..   [edited by - nervo on January 31, 2004 7:50:33 PM];  I appreciate those who've tried to help, but I think I need to make myself clearer: MY PROBLEM IS NOT HOW TO WRITE A CLASS. As I've already stated, the error REPORTED is NOT the ACTUAL error. This ACTUAL error is what I'm trying to trace down, NOT how to solve the REPORTED error. I'm guilty of this too, but please read the TEXT as well as the CODE, which I posted for purly illustrative purposes.ANSWER THIS QUESTION: What could be causing the compiler to report this error, assuming THE ERROR REPORTED is not the ACTUAL error?EDIT: Nervo, I would if I thought it would help, but the class causing the error is huge, and uses a number of other classes that are also huge. I basically need someone who's had this problem before.   [edited by - Silex on January 31, 2004 7:53:36 PM];  I''m thinking of an even number. What number am I thinking of? ;  Silex, you''re just gonna have to post code, because all we can say is that something is probably duplicated somewhere, maybe in a system header, and there''s no way we can find that without knowing what identifiers you''re talking about. I mean, you won''t even tell us which member function the error refers to, which could be a help.   [ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost  Asking Questions | Organising code files | My stuff | Tiny XML | STLPort] ;  As a wise fat-ass once said, "Screw you guys, I''m goin'' home." Seriously though, I''m going to change my class layout and hopefully that will solve my problem much faster than it would take you guys to understand my cryptic code. 