Results 1 to 2 of 2

Thread: multiple files

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    multiple files

    I have made a class....I want to put it in another cpp file to make the main CPP easier to handle. I get errors about my window handles from my main cpp file

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Hmm, what sort of error is it and on which line of code? When you put your class in a header file, you just have to define and then you can put all the code in your cpp file.
    PHP Code:
    //Header File
    class myclass
    {
    public:
    void function1();
    void function2();
    private:
    int myvar;
    //.......
    }; 
    PHP Code:
    //Class source file
    #include "myheader.h"
    void myclass::function1()
    {
    }
    void myclass::function2()
    {
    }
    //...... 
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width