Author Topic: How do I turn off bare std keyword highlight when I don't have using namespace?  (Read 405 times)

Offline EuphoricCatface

  • Single posting newcomer
  • *
  • Posts: 2
Hello, I make my C++ code without using namespace std
However, Code::Blocks seems to highlight std keywords when I don't have "using namespace std" nor "std::" appended.
I did google beforehand, but I didn't find any related question. It got me quite surprised, because afaik more people don't use "using namespace std"? Or maybe I quite suck at googling... :P
Anyhow, how do I disable this behavior?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11827
    • Travis build status
What exactly do you want to disable?

I guess you want to disable the STL keywords.
This is done here: Settings -> Editor -> Syntax highlight -> C++ -> Keywords -> Set -> 2 -> Delete what you don't like here.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline EuphoricCatface

  • Single posting newcomer
  • *
  • Posts: 2
Thank you for your answer. I have seen your reply but did not have a chance to try it out.
My environment was not working for other reason :P
Anyways. I assume, roughly, I could erase "std" from set 2 and put "std::" for any other keywords in the set?
Would that make, say, "std::cin" highlighted but not "cin" alone?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11827
    • Travis build status
No this won't going to work. Not sure if it will work if you put std::cin there.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]