User forums > General (but related to Code::Blocks)

No Syntax Highlighting for C++ Code

(1/3) > >>

lordnoxx:
Hi everybody.
I just turned to code::blocks runnning it on Windows XP. But now i have a problem regarding syntax highlighting and code completion for C++ code. Please have a look on the attached image. There you can see that "ofstream" and "cout" e.g. are not highlighted.
When i type "dataus." there is no popup of the completion list. What is going wrong here?
Btw: I don't have any similar problems with pure C code.

oBFusCATed:
c::b version? 10.05?
if so, and you want better CC use some of the latest nightlies...

btw the syntax highlight looks ok, c::b doesn't support context/semantic highlight...

lordnoxx:
Yes it is 10.05. After reopening the project the completion list appears when typing "dataus.". Then i get the whole bunch of what is in the ofstream class. Hmm ok...i also figured out, that there ist also no highlighting when using structs.

I just thougt it should always look like as if you declare "int i;" e.g with the "int" getting blue. Wouldn't it be nice if also class-names and struct-names are highlighted when declaring an instance of them? Just like with the basic data types (int, char, float....).

oBFusCATed:
int is a keyword, so it is highlighted as such.
For the others you're talking about semantic highlight which is hard.

ollydbg:

--- Quote from: oBFusCATed on January 19, 2011, 04:38:03 pm ---int is a keyword, so it is highlighted as such.
For the others you're talking about semantic highlight which is hard.

--- End quote ---
hopefully libclang can help us to do this :D

Navigation

[0] Message Index

[#] Next page

Go to full version