Hi,
If you want the layer and folder to be displayed in the picture viewer you need to define the parameter MPBTYPE_SAVE
to True.
MPBTYPE_SHOW
is defined by default to true when you add a layer.
This parameter will just disable the layer as seen below. (the red eye)

This example will create a folder with a layer in it and another layer below the folder.
If it is working with pyhton, it should work with c++, you can share a bit of your code so we can reproduce it.
from typing import Optional
import c4d
doc: c4d.documents.BaseDocument # The active document
op: Optional[c4d.BaseObject] # The active object, None if unselected
def main() -> None:
mpb = c4d.bitmaps.MultipassBitmap(640, 480, c4d.COLORMODE_ARGB)
folder1 = mpb.AddFolder(None)
folder1.SetParameter(c4d.MPBTYPE_NAME, "folder")
folder1.SetParameter(c4d.MPBTYPE_SAVE, True)
layer1 = folder1.AddLayer(None, c4d.COLORMODE_ARGB)
layer1.SetParameter(c4d.MPBTYPE_NAME, "layer1")
layer1.SetParameter(c4d.MPBTYPE_SAVE, True)
layer2 = mpb.AddLayer(folder1, c4d.COLORMODE_ARGB)
layer2.SetParameter(c4d.MPBTYPE_NAME, "layer2")
layer2.SetParameter(c4d.MPBTYPE_SAVE, True)
c4d.bitmaps.ShowBitmap(mpb)
if __name__ == '__main__':
main()
Cheers,
Manuel