hi

i have encountered a problem with g++

i have a class a, with forward declaration of a function "do_something" and
a constructor a(int val);
i implement them in a cpp file.

g++ complains of redefinition of the constructor but not of the
do_something() function.

why ?

files:
== a.h ===
class a {
int m_a;
 a (int val);
 void do_somthing()
}

== a.cpp ===
#include "a.h"
a::do_somthing {a.m_a++;};
a::a(int val):m_a(val) {};

============


any idea ?
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to