Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zdena on May 10, 2019, 08:20:50 am

Title: Const variables mouse over
Post by: zdena on May 10, 2019, 08:20:50 am
Hello,
if I define a macro in the code I can see the value in a tooltip (attachment 1).

Can I also see the value if I use a const variable instead of #define?

I tried to set "Evaluate expression under cursor" in debugger settings, but it works only during debugging.

Code
#include <iostream>

using namespace std;
#define VARIABLE_DEFINE 222
const int VARIABLE_CONST = 222;
int test;

int main()
{
  cout << "Hello world!" << endl;
  test = VARIABLE_DEFINE;
  test = VARIABLE_CONST;

  return 0;
}
Title: Re: Const variables mouse over
Post by: BlueHazzard on May 11, 2019, 05:04:00 pm
I do not think that the cc plugin (the plugin providing tool tips) can do this at the moment...
Title: Re: Const variables mouse over
Post by: zdena on May 11, 2019, 06:27:09 pm
@BlueHazzard: Thank you.