Thread: Problem with class header please help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Problem with class header please help

    Hello
    i have a problem.... i am trying to split a cpp file, where i have the class declaration, class implementation and main, into three separate files.
    So i have created dataset.h with the following code:
    Code:
    #if !defined(DATASET_H)
    #define DATASET_H
    
    class DataSet
    {
    public: .....
    private......
    }
    #endif
    
    The file dataset.cpp with:
    #include "dataset.h"
    
    DataSet::DataSet
    {
    }
    .... and  the other member functions declarations.
    and the file main.cpp with

    #include "dataset.h"
    and the main function, where i call some public member functions of class DataSet. When i compile, it says:
    Linker error: undefined symbol dataset::function1 in module main
    and the same for all the functions i try to call.

    What did i do wrong? The program worked perfectly before trying to split it.

    Thank you very much.
    Last edited by Salem; 08-09-2006 at 10:52 AM. Reason: code tags - learn to use them!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Replies: 3
    Last Post: 12-03-2001, 01:45 PM