Class Errors - Undefined reference to class::function

closed account (zvRX92yv)
Well, I'm making a class for storing bits.. And I'm not sure what the problem is..

For every function used, there's an error as in the title.

I have absolutely no idea what is causing this..

bitstore.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef BITSTORE_H
#define BITSTORE_H

typedef unsigned char byte;
typedef unsigned long long uint64_t;

class bitstore
{
    public:
        byte *array;
        uint64_t size;

        // Constructors
        bitstore()
            { array = 0; size = 0; };
        bitstore( uint64_t bits, bool value )
            { alloc( bits, value ); };

        // Destructor
        ~bitstore()
            { delete [] array; };

        // Allocation and Deallocation
        void alloc( uint64_t bits, bool value );
        void dealloc( uint64_t bits );

        // Access and Modification
        bool get( register uint64_t slot );
        void set( register uint64_t slot, bool value );
        void flip( register uint64_t slot );

    private:
        byte tempBit;
};

#endif // BITSTORE_H 
Last edited on
which IDE are you using? some ideas need it to be added to the project through the IDE.

if its Code::Blocks, go to project add to project and find the files that way.
closed account (zvRX92yv)
What..

How did you know that!?

It worked ._.
I had a similar problem a few weeks ago when i switched to code blocks
Topic archived. No new replies allowed.