---
title: "Discussion on \"How structure-padding in C/C++ actually works\" | Hashnode"
description: "Discussion on \"How structure-padding in C/C++ actually works\". Structure padding is an often misunderstood concept of C++. Here we will dive deep into how it actually works and what we can do to prevent it"
url: "https://hashnode.com/posts/cxx-structure-padding/64ce5c21feb9a458d3d22ecd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How structure-padding in C/C++ actually works](https://darkmortal.hashnode.dev/cxx-structure-padding?utm_source=hashnode&utm_medium=feed)

Structure padding is an often misunderstood concept of C++. Here we will dive deep into how it actually works and what we can do to prevent it

Dec 31, 2021 · 5 min read · darkmortal.hashnode.dev  
Updated May 14, 2024  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#c](https://hashnode.com/tag/c)
-   [#structure](https://hashnode.com/tag/structure)
-   [#padding](https://hashnode.com/tag/padding)

## Written by

[Saptarshi Dey](https://hashnode.com/@darkmortal)

@darkmortal · Kolkata, India

  
[View profile](https://hashnode.com/@darkmortal)

Crushing my limits and hacking my way through

Programming and mathematics geek with an interest in chess, anime, and geopolitics

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
