Before the KE read and save function, unexpectedly appears for{for{if{for{switch{if{for{}}}}}} such complex nesting, the code looks very faint. In this case, it is necessary to fold the code so that the logical relationship can be easily and geographically clear.
Auto-collapse markup for Visual Studio, the default is to have the ' + ' number only in the function, and if,for,switch these places are not. Can be opened in this way: tool--> option--> text editor-->c/c++--> formatting--> outline statement block--> set to true
manually adding fold marks The above method is simple and convenient, But there are too many folding tags to look dizzy, so we can also manually add, can be folded anywhere. Add the #pragma region ABC and #pragma endregion ABC separately to the beginning and end of the collapsed area (ABC modifiable)
Pragma_directives_region.cpp
#pragma region region_1
void Test () {} void
Test2 () {}
void Test3 () {}< c6/> #pragma endregion region_1
int main () {}
Msdn:https://technet.microsoft.com/zh-cn/exchange/b6xkz944#pragma preprocessing directives more usage: http://baike.baidu.com/subview/ 1451188/1451188.html