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

bug in commet line

(1/1)

perento:

--- Code: ---void HANGMAN::ClearScreen(){  //Clears the screen in radius {80,30}
    COORD homeCoord = {0,0};
   
    //{80,30} is enough to clear the previous game <- this line
    SetConsoleCursorPosition (hStdout, homeCoord);
    for (int row = 0; row < 30; row++){
        for (int col = 0; col < 80; col++){
            cout << ' ';
        }
    }
    SetConsoleCursorPosition (hStdout, homeCoord);
}
--- End code ---

the combo of //{ , if your try to hide that function body, you will hide all of the .cpp file, and you cant get acces to the functions below ClearScreen().
If i make // { with a whitespace, everything will be ok, but without a whitespace it get bugged

oBFusCATed:
Screen shot? (please use image sharing site, not the attachment feature of the forum).

Also please post some version information, my magic ball is pretty exhausted by now, no more mana is telling me...

perento:
http://prikachi.com/images/909/4831909w.jpg here is with whitespace // {
http://prikachi.com/images/910/4831910z.jpg here is without whitespace //{

PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.

oBFusCATed:
Hm, this might be a feature of Scintilla to support regions and it might be buggy in 10.05 :)
Can you try a nightly build, because in my version r8020 it works way better.
The strange thing is that the ///@{ ///@}, the doxygen region markers, do not produce the same result.
Morten do you know something about this "feature"?


--- Quote from: perento on May 30, 2012, 02:48:24 am ---PS; could you please give me a short feedback on what you think of that .h design. I wanna make some good design habits but dont know how it goes.

--- End quote ---
No, this is not a general programming forum ... try in stackover or comp.lang.c++ or comp.lang.c++.moderated.

MortenMacFly:
Yes, this is a special feature of scintilla. These regions help you to collapse parts of your code. wxSmith also makes use of this in a similar fashion. If you don't want that, make a space in between. There might also be an option to disable such regions, but I don't think its wise to apply this because this is really a nice feature (which I am using rather regularly btw...).

Navigation

[0] Message Index

Go to full version