Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › [Help]Concatenate byte arrays

[Help]Concatenate byte arrays

Posts 1–7 of 7 · Page 1 of 1
freedompeace
freedompeace
[Help]Concatenate byte arrays
Code:
byte one[] = { 1, 1 };
byte two[] = { 2, 4 };
byte three[sizeof(one) + sizeof(two)] = ?
I'm stumped on how to do this (efficiently). /:
#1 · 15y ago
MM
mmbob
I'm not sure if there is any way to do that at compile time without using #defines. I'm talking about something like this:
Code:
#define _ONE 1, 1
#define _TWO 2, 4
byte one[] = {_ONE};
byte two[] = {_TWO};
byte three[] = {_ONE, _TWO};
I'm sure there is a less hacky way to do it though.
#2 · 15y ago
NextGen1
NextGen1
[Help] Tags added, It's easier for us to know what it is you are looking for
#3 · 15y ago
freedompeace
freedompeace
I want to do this at run time O:

I know I can just iterate through each byte and assign it, but is there a function that does it for me? (a C++ function that may be more efficient or faster or something_
#4 · 15y ago
freedompeace
freedompeace
//b-bump? S:
#5 · 15y ago
MM
mmbob
Quote Originally Posted by freedompeace View Post
//b-bump? S:
1. Don't double post.
2. The fastest you could get this at run-time would probably using memcpy to copy the bytes.
#6 · 15y ago
Hell_Demon
Hell_Demon
malloc & memcpy
#7 · 15y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • [RELEASE||HELP]Compression and Encryption of Byte ArraysBy topblast in Visual Basic Programming
    0Last post 15y ago
  • [Help]WriteProcessMemory - Write byte array?By master131 in Visual Basic Programming
    29Last post 15y ago
  • [Help] Byte array to string, Then in XML (LINQ)By topblast in Visual Basic Programming
    13Last post 15y ago
  • [Help] Dark Byte SpeedBy Truly Free in Combat Arms Hacks & Cheats
    23Last post 17y ago
  • [Help] Dark Byte's speed hack does not work for XPBy KiLlArRo2 in Combat Arms Help
    17Last post 17y ago

Tags for this Thread

None