# C++ Transition Guide for 5.4

**URL:** <https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 1, 2024, 11:36pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583 "2024-05-01T23:36:54Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 2, 2024, 12:08am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/4 "2024-05-02T00:08:12Z")

</div>

## error C2248: ‘TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>::IndexSize’: cannot access private member

> [@UE5.4.0-preview-1: C2248 'TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>::IndexSize': cannot access private member declared in class 'TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>'](https://forums.unrealengine.com/t/ue5-4-0-preview-1-c2248-tmemorywriterbase-tsizeddefaultallocator-32-indexsize-cannot-access-private-member-declared-in-class-tmemorywriterbase-tsizeddefaultallocator-32/1774878/14):
>
> not very sure if this is a bug ,but epic tweaks some of the setting in each version,like cpp standards upgrades and code style check,they also mentioned that settings will cause some compile issues ,so just stick to their latest will make it easier grin

Original

```auto
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponTarget : TargetRules
{
	public PMeleeWeaponTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		bUsesSteam = true;
        ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

Solution ~~~\> DefaultBuildSettings = BuildSettingsVersion.Latest;

```auto
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponTarget : TargetRules
{
	public PMeleeWeaponTarget(TargetInfo Target) : base(Target)
	{
        DefaultBuildSettings = BuildSettingsVersion.Latest;
		Type = TargetType.Game;
		bUsesSteam = true;
        ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

Make sure to include this line

` DefaultBuildSettings = BuildSettingsVersion.Latest;`

in

`[YourProject].target.cs`

and

`[YourProject]Editor.target.cs`

and perform a full Re-Build \<~~~

Also, make sure to remove any other values of DefaultBuildSettings, such as

`DefaultBuildSettings = BuildSettingsVersion.V2; <~~~ Remove`

❤

Rama

---

_[View the full topic](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583)._
