Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent of #region for C++

Tags:

c++

c#

What's the C++ equivalent of #region for C++ so I can put in custom code collapsible bits and make my code a little easier to read?

like image 986
Dollarslice Avatar asked Jan 25 '12 09:01

Dollarslice


People also ask

Is it equivalent to or equivalent of?

When equivalent is used as a noun, the most common preposition is of: 150 grams are the equivalent of a medium-sized potato. James thought retiring is the equivalent of a death sentence.

What is the of equivalent?

Definition of equivalent 1 : equal in force, amount, or value also : equal in area or volume but not superposable a square equivalent to a triangle. 2a : like in signification or import. b : having logical equivalence equivalent statements. 3 : corresponding or virtually identical especially in effect or function.

What is an example of equivalent?

The definition of equivalent is something that is essentially the same or equal to something else. An example of equivalent is (2+2) and the number 4. Since 2+2= 4, these two things are equivalent. To make equivalent to; to equal.


Video Answer


1 Answers

The Region keyword is IDE specific and affects rendering in Visual Studio. The nearest equivalent is #pragma Region which is applicable to Visual Studio only .

Code example from MSDN

// pragma_directives_region.cpp #pragma region Region_1 void Test() {} void Test2() {} void Test3() {} #pragma endregion Region_1  int main() {} 
like image 81
Dr. Andrew Burnett-Thompson Avatar answered Nov 08 '22 12:11

Dr. Andrew Burnett-Thompson