Author Topic: 13.12 Code Completion token is public instead of private  (Read 5100 times)

SpitFire707

  • Guest
13.12 Code Completion token is public instead of private
« on: January 25, 2014, 03:08:56 am »
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.
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();



EDIT: I reloaded the project, which I should have done before making this post  ;D, and everything is working fine again.
« Last Edit: January 25, 2014, 04:31:16 pm by SpitFire707 »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: 13.12 Code Completion token is public instead of private
« Reply #1 on: January 25, 2014, 02:05:20 pm »
This is my test on latest SVN head.

Source code:
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.