News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

13.12 Code Completion token is public instead of private

Started by SpitFire707, January 25, 2014, 03:08:56 AM

Previous topic - Next topic

SpitFire707

I am writing a chip8 emulator as a fun project, and when using the dot(.) operator on an object of class chip8, the function void init() token shows up green as public instead of red as private, in the code completion window.
class chip8 {
private:
unsigned short int opcode;
unsigned char memory[4096];
unsigned char V[16];
unsigned short int I;
unsigned short int pc;
unsigned char delayTimer;
unsigned char soundTimer;
unsigned short int chip8Stack[16];
unsigned short int sp;
void init();




EDIT: I reloaded the project, which I should have done before making this post  ;D, and everything is working fine again.

ollydbg

This is my test on latest SVN head.

Source code:


class chip8 {
private:
unsigned short int opcode;
unsigned char memory[4096];
unsigned char V[16];
unsigned short int I;
unsigned short int pc;
unsigned char delayTimer;
unsigned char soundTimer;
unsigned short int chip8Stack[16];
unsigned short int sp;
void init();
};

void f()
{

    chip8 aaa;

    aaa.
}



It looks like I don't have this issue, see screen shot below.

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.