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

KillAWatt1705 picture KillAWatt1705 · Mar 12, 2013 · Viewed 7.6k times · Source

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.

Answer

Shmil The Cat picture Shmil The Cat · Mar 12, 2013

You can use #pragma region:

#pragma region foo
// some code ...
#pragma endregion foo