Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

#pragma mark equivalent in Visual Studio for C++?

Is there a Visual Studio preprocessor equivalent of #pragma mark found in XCode? Here's why I ask:

This is on Windows.

enter image description here

This is on Mac.

enter image description here

I know of #region in C#, but nothing of similar functionality in C++.

EDIT 12/03/2013:

#pragma region adds collapsibility to code, but doesn't add sections to VS's method listings, which is essentially what I'm looking for. I much prefer to jump to methods quickly using the function listing, especially in large classes/files where scrolling through a forest of code is a no-no; the "sectioning" really shines in such cases.

I was really expecting Visual Studio to have this kind of functionality, seems like something pretty basic. Pretty sure Eclipse lets you do this with the Coffee-Bytes plugin too.

like image 600
KillAWatt1705 Avatar asked Mar 12 '13 11:03

KillAWatt1705


2 Answers

Apparently, it is not in Visual studio 2015 and I don't think it will be in the near future. [Reference]

Thanks for taking the time to share this suggestion. This item has been around for a couple of versions of Visual Studio and we haven’t acted on it. Looking at the VS “15” plans, we’re not going to take action on this item, so we’re going to close it. If the suggestion is still relevant, please either take a look to see if there’s another suggestion that’s similar that you can vote on, or open a new suggestion.

like image 166
FrankS101 Avatar answered Nov 10 '22 01:11

FrankS101


You can use #pragma region:

#pragma region foo
// some code ...
#pragma endregion foo
like image 4
Shmil The Cat Avatar answered Nov 10 '22 01:11

Shmil The Cat