#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    1
    Rep Power
    0

    error: undefined reference to


    hi there,
    I wrote a class called bfir.cpp and a header file
    bfir.h. Inside the constructor i call another
    function called "parser" which is in the same class

    In the bfir.h header file:

    class bfir {
    public:
    bfir(char *docname);
    ~bfir();
    int getNum(void);
    private:
    void parser( char *docname);

    In the bfir.cpp file

    bfir::bfir(char *docname)
    {
    parser(docname);
    }

    void bfir::parser(char *docname) { }

    I also write a main.cpp and inside the main i create an object called "mfir", i wrote;

    int main(){
    char *filename="inps.xml";
    bfir mfir(filename);
    return 0; }

    when i run the program, i got an error messege like;
    ccbtA5tC.o(.text+0x3a):undefined reference to
    bfir::bfir[in-charge](char*).

    Can you guide me how can i fix this problem?

    Thnks
  2. #2
  3. No Profile Picture
    Dinesh_P_V
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    India
    Posts
    259
    Rep Power
    0

    error: undefined reference to


    You have not mentioned, the code containing in-charge keyword
    Probably
    it will be in_change
    -Murugesan

IMN logo majestic logo threadwatch logo seochat tools logo