[SOLVED] C++ program does not compile

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
mahaju
Posts: 487
Joined: Mon 11 Oct 2010, 07:11
Location: between the keyboard and the chair

[SOLVED] C++ program does not compile

#1 Post by mahaju »

Hi can anyone please tell me what is the mistake here?

Code: Select all

class D_flipflop(){
    private:
        uint Q, Q_d, D, clk;
//        RS_flipflop a;
    public:
        D_flipflop(){
            D = 0;
//            Q = a.get_Q();
//            Q_d = a.get_Q_d();
            clk = 1;
        }

        D_flipflop(char a){
            if(a=='d') {
                D_flipflop();
                clk = 0;
            }

            else{
//                a.reinitialize('a');
                D_flipflop();
                D = 0;
                clk = 1;
            }
        }

        uint compute(uint d_inp, uint clk){
            D = d_inp;
//            a.compute(D, not_gate(D) );
//            Q = a.get_Q();
//            Q_d = a.get_Q_d();
        }

        uint get_Q(){ return Q; }
        uint get_Q_d(){ return Q_d; }
};

int main(){}
This is the error I get (Codeblocks 8.02

Code: Select all

D:\CB_Files\bit_level_manip\test.cpp|1|error: expected unqualified-id before ')' token|
||=== Build finished: 1 errors, 0 warnings ===|
what does this mean
By the way, please ignore the object of class RS_flipflop for now, I need to get this piece of code to compile first
Last edited by mahaju on Tue 03 May 2011, 13:10, edited 1 time in total.

User avatar
mahaju
Posts: 487
Joined: Mon 11 Oct 2010, 07:11
Location: between the keyboard and the chair

#2 Post by mahaju »

I had made a really stupid mistake
:oops:
Please ignore this thread

Post Reply