<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: estrolabz</title>
    <description>The latest articles on DEV Community by estrolabz (@estrolabz).</description>
    <link>https://dev.to/estrolabz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3349296%2F9d45c742-c96e-4ebe-89bb-4e72e9b7a8a6.png</url>
      <title>DEV Community: estrolabz</title>
      <link>https://dev.to/estrolabz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/estrolabz"/>
    <language>en</language>
    <item>
      <title>DAY 03 - Few Days into My SDK in C++… and I'm Already Switching to C</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Fri, 01 Aug 2025 00:55:04 +0000</pubDate>
      <link>https://dev.to/estrolabz/day-03-few-days-into-my-sdk-in-c-and-im-already-switching-to-c-2p0c</link>
      <guid>https://dev.to/estrolabz/day-03-few-days-into-my-sdk-in-c-and-im-already-switching-to-c-2p0c</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;So I’ve spent the last few days building the foundation of my SDK in C++. Got a window on the screen. OpenGL is rendering a background colour. Everything works.&lt;/p&gt;

&lt;p&gt;But the more I build, the more I realize: this isn’t how I want to keep going.&lt;/p&gt;

&lt;p&gt;I’m switching to C.&lt;/p&gt;

&lt;p&gt;And here’s why.&lt;/p&gt;




&lt;h2&gt;
  
  
  I’m Not Building Apps — I’m Building the Foundation
&lt;/h2&gt;

&lt;p&gt;This SDK isn’t just a one-off game or tool. It’s meant to be the backbone for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Games (focused on performance and security)&lt;/li&gt;
&lt;li&gt;Cybersecurity tools (minimal attack surface)&lt;/li&gt;
&lt;li&gt;Cross-platform apps (desktop, mobile, and eventually bare metal)&lt;/li&gt;
&lt;li&gt;My &lt;strong&gt;own operating system&lt;/strong&gt; down the line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that kind of ambition, every layer needs to be as tight and efficient as possible. That means no assumptions, no magic, no runtime surprises.&lt;/p&gt;

&lt;p&gt;And in C++, that’s hard to guarantee.&lt;/p&gt;




&lt;h2&gt;
  
  
  C++ Fights You When You Want Control
&lt;/h2&gt;

&lt;p&gt;Sure, C++ gives you features. But I quickly realized I was spending more time &lt;strong&gt;avoiding&lt;/strong&gt; them than using them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoiding dynamic allocation&lt;/li&gt;
&lt;li&gt;Avoiding exceptions&lt;/li&gt;
&lt;li&gt;Avoiding RTTI&lt;/li&gt;
&lt;li&gt;Avoiding STL&lt;/li&gt;
&lt;li&gt;Fighting templates when I just need predictable code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had to constantly disable or override behaviours. It felt like I was writing C anyway — just with C++ in the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  C Just Makes Sense for What I’m Doing
&lt;/h2&gt;

&lt;p&gt;C gives me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full control over memory&lt;/li&gt;
&lt;li&gt;Predictable compilation and ABI&lt;/li&gt;
&lt;li&gt;Straightforward debugging and binaries&lt;/li&gt;
&lt;li&gt;Total portability&lt;/li&gt;
&lt;li&gt;No runtime dependencies I didn’t ask for&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I build a logger in C, I know exactly how it's printed.&lt;/p&gt;

&lt;p&gt;When I allocate memory, I know when and how it’s freed.&lt;/p&gt;

&lt;p&gt;When I port to my own OS, there’s nothing hidden to re-implement.&lt;/p&gt;

&lt;p&gt;C doesn't fight me. It just does what I tell it to do.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Isn’t Anti-C++
&lt;/h2&gt;

&lt;p&gt;C++ is great for higher-level application logic or large projects with the right architecture. If you're using Qt, Unreal, or big frameworks — totally valid.&lt;/p&gt;

&lt;p&gt;But if you're trying to squeeze out every cycle, avoid runtime surprises, and get your code booting off a flash drive eventually — C wins.&lt;/p&gt;




&lt;h2&gt;
  
  
  What’s Next
&lt;/h2&gt;

&lt;p&gt;I’m rewriting the SDK in clean, modular C. No STL. No templates. Just:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logging&lt;/li&gt;
&lt;li&gt;Memory&lt;/li&gt;
&lt;li&gt;Input&lt;/li&gt;
&lt;li&gt;Rendering&lt;/li&gt;
&lt;li&gt;Platform abstraction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All portable. All optimized. All mine.&lt;/p&gt;

&lt;p&gt;Later, when I build my own OS kernel, I won’t need to rework anything. This C core will already be ready.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;This isn’t about hating on modern tools. It’s about knowing what kind of control I need, and using the language that gives me that control without compromise.&lt;/p&gt;

&lt;p&gt;C++ is powerful, but I’m building something where &lt;strong&gt;power needs to be explicit&lt;/strong&gt;, not hidden behind layers of abstraction.&lt;/p&gt;

&lt;p&gt;I’m only a few days in, and this switch already feels like the right move.&lt;/p&gt;

&lt;h1&gt;
  
  
  YouTube (STARTING A CHANNEL)
&lt;/h1&gt;

&lt;p&gt;So I have also decided to create videos where I code the entire project and share my process and journey on my YouTube Channel 🙂&lt;br&gt;
&lt;a href="https://www.youtube.com/@estrolabz" rel="noopener noreferrer"&gt;https://www.youtube.com/@estrolabz&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Contact &amp;amp; Other Socials
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.instagram.com/estrolabz/" rel="noopener noreferrer"&gt;https://www.instagram.com/estrolabz/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/ESTROLABZ" rel="noopener noreferrer"&gt;https://www.patreon.com/c/ESTROLABZ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@ESTROLABZ" rel="noopener noreferrer"&gt;https://www.youtube.com/@ESTROLABZ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/estrolabz" rel="noopener noreferrer"&gt;https://github.com/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/estrolabz"&gt;https://dev.to/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ESTROLABZ/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ESTROLABZ/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link" rel="noopener noreferrer"&gt;https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>c</category>
      <category>security</category>
    </item>
    <item>
      <title>WHY ARE WE STILL BUILDING APPS ON INSECURE FOUNDATIONS?</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Tue, 29 Jul 2025 22:58:26 +0000</pubDate>
      <link>https://dev.to/estrolabz/why-are-we-still-building-apps-on-insecure-foundations-24e4</link>
      <guid>https://dev.to/estrolabz/why-are-we-still-building-apps-on-insecure-foundations-24e4</guid>
      <description>&lt;p&gt;&lt;strong&gt;YouTube Channel:&lt;/strong&gt; &lt;a href="https://www.youtube.com/@ESTROLABZ" rel="noopener noreferrer"&gt;https://www.youtube.com/@ESTROLABZ&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>c</category>
      <category>developer</category>
    </item>
    <item>
      <title>DAY 02 - From Code to Canvas: My SDK Renders Its First Window (OpenGL)</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Tue, 29 Jul 2025 03:42:18 +0000</pubDate>
      <link>https://dev.to/estrolabz/day-02-from-code-to-canvas-my-sdk-renders-its-first-window-4eh4</link>
      <guid>https://dev.to/estrolabz/day-02-from-code-to-canvas-my-sdk-renders-its-first-window-4eh4</guid>
      <description>&lt;p&gt;&lt;strong&gt;I'm building a high-performance C++ SDK for making native, OpenGL-accelerated Windows apps — with security and modularity in mind.&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Recap
&lt;/h1&gt;

&lt;p&gt;Hello everyone and welcome back to another devlog! Yesterday we managed to setup the project and get everything working ready to start creating a window with an OpenGL context. We managed to create our project structure (Lib / DLL) &lt;strong&gt;ELBZ&lt;/strong&gt; and (Test App) called &lt;strong&gt;TestLab&lt;/strong&gt; then create our application and entry-point ready for use when we use &lt;strong&gt;ELBZ&lt;/strong&gt; to create real-world applications.&lt;/p&gt;

&lt;p&gt;If you have not seen the last dev log here is a link:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.notion.so/DAY-01-I-setup-my-SDK-Project-and-Created-the-Entry-Point-23c763e1ef908011ac3ac533950b2441?pvs=21" rel="noopener noreferrer"&gt;DAY 01 - I setup my SDK Project and Created the Entry Point!&lt;/a&gt; &lt;/p&gt;

&lt;h1&gt;
  
  
  Todays Objectives
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Create a Windows Window Natively&lt;/li&gt;
&lt;li&gt;Setup Glad as a Static Library&lt;/li&gt;
&lt;li&gt;Create an OpenGL Render  Context with OpenGL 4.6&lt;/li&gt;
&lt;li&gt;Change the background screen to be another colour (Proves OpenGL is working!)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Progress
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Creating the Native Window in Windows
&lt;/h2&gt;

&lt;p&gt;So today I started by creating a simple header file with my window class structure like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Window&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nl"&gt;public:&lt;/span&gt;

    &lt;span class="n"&gt;Window&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;wchar_t&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;_title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;short&lt;/span&gt; &lt;span class="n"&gt;_width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;short&lt;/span&gt; &lt;span class="n"&gt;_height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;Window&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nl"&gt;private:&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;window_instance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;nullptr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;device_context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;nullptr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;render_context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;nullptr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;wchar_t&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;short&lt;/span&gt; &lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;short&lt;/span&gt; &lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I decided to have three void pointers for storing important links to different aspects of the window that I may need to keep track of for the future.&lt;/p&gt;

&lt;p&gt;I also decided to just take a title, width and height for the window for now as that is all I really need for this current moment in time.&lt;/p&gt;

&lt;p&gt;As for the functions I am using a &lt;code&gt;init&lt;/code&gt;, run and shutdown sequence of code. The constructor is the &lt;code&gt;init&lt;/code&gt; method, the run is the run and the de-constructor is the shutdown method, used to handle the life cycle of the native windows window system. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtt7cnh0zqxf7svmpypv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtt7cnh0zqxf7svmpypv.png" alt=" " width="786" height="593"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Adding Default OpenGL Context
&lt;/h2&gt;

&lt;p&gt;Next I added the default OpenGL Context to my window which resulted in this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Render: clear black&lt;/span&gt;
&lt;span class="n"&gt;glClearColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;glClear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;GL_DEPTH_BUFFER_BIT&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimndinndy4hhrw3kcocd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimndinndy4hhrw3kcocd.png" alt=" " width="786" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fantastic its working!!!!!!&lt;/p&gt;

&lt;p&gt;As you can see I have successfully got a window with OpenGL but… here is the thing this is using legacy OpenGL not modern OpenGL 4.6 so now its time to fix that.&lt;/p&gt;




&lt;h2&gt;
  
  
  Adding Glad to Enable Modern OpenGL 4.6
&lt;/h2&gt;

&lt;p&gt;Adding glad caused quite a lot of headaches but after using different versions and figuring out why things don’t map correctly to each other I decided that I would create a new static library and link it to my &lt;code&gt;dll&lt;/code&gt; and it seemed to fix my issue:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rd07ewz4yaytxpiuj7a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4rd07ewz4yaytxpiuj7a.png" alt=" " width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Now that I have created the new static lib I configured it with all the linking, defines build procedures etc…&lt;/p&gt;

&lt;p&gt;Then after that I Generated the Glad Code for OpenGL 4.6 and WGL 1.0 - this was necessary because I was setting up a GL Context natively not using GLFW or SDL2  which means I needed to manually configure WGL to get OpenGL working with windows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up the Modern OpenGL Context
&lt;/h2&gt;

&lt;p&gt;Now that I had Glad fully working and setup I could use it to create the context for the native window to finally render graphics using Modern OpenGL. &lt;/p&gt;

&lt;p&gt;I did this by firstly setting up a Pixel Descriptor, then setting it to the device context of the window then I had to create a temp context which is just to setup OpenGL and will be deleted after making it the current context.&lt;/p&gt;

&lt;p&gt;Once that was done I could setup some attributes for OpenGL like setting the version I want to use etc…&lt;/p&gt;

&lt;p&gt;Then I proceeded to create the context attrib arbs which just creates a gl context for me which will allow me to test OpenGL and ensure it is all working correctly.&lt;/p&gt;

&lt;p&gt;Once that was done I could delete the temp context as it was not needed any more and create a new one which was my main context used for my actuall SDK.&lt;/p&gt;

&lt;p&gt;Then I proceeded to check glad is loaded and working correctly and set the different pointers of the window class to be what I need such as device context and render context.&lt;/p&gt;

&lt;p&gt;I also output some debug info to the screen just so that I could see some useful information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenGL Version&lt;/li&gt;
&lt;li&gt;OpenGL Renderer - which is the graphics card&lt;/li&gt;
&lt;li&gt;OpenGL Shading Language Version&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Configuring OpenGL On-Update
&lt;/h2&gt;

&lt;p&gt;Now that the context was setup I could go to my main loop and set OpenGL background colour clear and swap buffers to ensure it actually renders on the window I want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Render: clear black&lt;/span&gt;
&lt;span class="n"&gt;glClearColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;glClear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;GL_DEPTH_BUFFER_BIT&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Swap buffers&lt;/span&gt;
&lt;span class="n"&gt;SwapBuffers&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;HDC&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="n"&gt;device_context&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;With that the results are as shown here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70p8mefzt4rc1xu86wl3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70p8mefzt4rc1xu86wl3.png" alt=" " width="800" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I successfully got a OpenGL window rendered with some debug info in the console for reassurance everything is working as expected! 😊&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;After implementing these features it was a little challenging at times but overall not too difficult and now I am more than every excited to start developing a 2D renderer and UI library etc… I cannot wait to make this SDK powerful with security, efficiency and practicality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tomorrows Objectives:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add a OpenGL API Layer (Raw OpenGL Code)&lt;/li&gt;
&lt;li&gt;Add a Graphics Render API Layer (Interfaces between all possible graphics apis and the renderer)&lt;/li&gt;
&lt;li&gt;Add a Renderer 2D Layer (Allows things like creating rectangles on the screen something simple)&lt;/li&gt;
&lt;li&gt;Create a Logger (I need the ability to log to the console more professionally and not just std::couts everywhere)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Support
&lt;/h2&gt;

&lt;p&gt;This SDK is still early in development, and I’m not ready to charge for it yet.&lt;/p&gt;

&lt;p&gt;But if you'd like to support development or get early access when builds drop, you can follow or join here: my &lt;strong&gt;Patreon&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contact &amp;amp; Other Socials
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.instagram.com/estrolabz/" rel="noopener noreferrer"&gt;https://www.instagram.com/estrolabz/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/ESTROLABZ" rel="noopener noreferrer"&gt;https://www.patreon.com/c/ESTROLABZ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@estrolabzuk" rel="noopener noreferrer"&gt;https://www.youtube.com/@estrolabzuk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/estrolabz" rel="noopener noreferrer"&gt;https://github.com/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/estrolabz"&gt;https://dev.to/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ESTROLABZ/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ESTROLABZ/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link" rel="noopener noreferrer"&gt;https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>cpp</category>
      <category>beginners</category>
      <category>devlog</category>
    </item>
    <item>
      <title>DAY 01 - The Entry Point to Everything</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Mon, 28 Jul 2025 04:06:32 +0000</pubDate>
      <link>https://dev.to/estrolabz/day-01-i-setup-my-sdk-project-and-created-the-entry-point-1gnn</link>
      <guid>https://dev.to/estrolabz/day-01-i-setup-my-sdk-project-and-created-the-entry-point-1gnn</guid>
      <description>&lt;h1&gt;
  
  
  Recap
&lt;/h1&gt;

&lt;p&gt;My last dev log was showing my progress of developing my SDK data type library, however after using that I noticed a lot of issues with it and decided to scrap it all together for now, I will explain why during this section.&lt;/p&gt;

&lt;p&gt;I also decided to scrap my entire project and start again. The reason for this is that I was using &lt;code&gt;premake5&lt;/code&gt; as my build system and had a lot of issues with visual studio and getting everything working how I wanted. So I decided you know what I don’t need a build system I can just setup the project configuration on each platform that I need when I need to develop for it.&lt;/p&gt;

&lt;p&gt;So, as for my data type library. I had issues with cross compatibility with using &lt;code&gt;windows.h&lt;/code&gt; function data types which causes so much frustration and headaches I decided to just scrap it for now and focus on what matters, until I gain the knowledge and ability to create this library without these issues.&lt;/p&gt;

&lt;p&gt;One of the reasons for making this decision to scrap my current work and start again was due to the fact that I could not get pre-compiled headers to work and link correctly using &lt;code&gt;premake&lt;/code&gt; it constantly created more issues with my code and I just decided to do it all manually as it would be faster.&lt;/p&gt;

&lt;p&gt;Lastly I realised that I should focus on making my code work before making it look pretty and efficient. So I actually realised the hard way that instead of spending months working on the little things I should just spend some time getting a working version of my project using the standard library in C++ and then one day once I have everything up and running and working I can go back and replace the standard library functionality with my own custom stuff which will also allow for better testing and ensuring it meets the exact requirements instead of guessing and having issues like I did with my data type library. It was not tested in the real application until too late and failed which resulted in taking too much time to fix or just scrap for now.&lt;/p&gt;

&lt;h1&gt;
  
  
  Todays Objectives
&lt;/h1&gt;

&lt;p&gt;Today I plan to get my entire project setup manually using Visual Stduio 2022 on Windows 64-bit. To do this I need to complete the following objectives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Shared Library Project&lt;/li&gt;
&lt;li&gt;Create a &lt;strong&gt;TestLab&lt;/strong&gt; App Project&lt;/li&gt;
&lt;li&gt;Create a Custom Configuration&lt;/li&gt;
&lt;li&gt;Create a Pre-Build Step for &lt;strong&gt;TestLab&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Create the Core Application Class&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Progress
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Setting Up the Initial Projects
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ELBZ DLL Project
&lt;/h3&gt;

&lt;p&gt;The first project I setup was &lt;strong&gt;ELBZ&lt;/strong&gt; my shared library project which will power all software built with &lt;strong&gt;ELBZ&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshrp1mihg198yj9alal7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshrp1mihg198yj9alal7.png" alt=" " width="800" height="538"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;TestLab&lt;/strong&gt; Application Project
&lt;/h3&gt;

&lt;p&gt;Next I created the &lt;strong&gt;TestLab&lt;/strong&gt; Project which is an application that will allow me to test my ELBZ Library by calling functions and simulating usage of the SDK.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuej7e2f9xlwevfr67tq4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuej7e2f9xlwevfr67tq4.png" alt=" " width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Setting Up the Core API Logic
&lt;/h2&gt;

&lt;p&gt;Inside of the Core file will be all the core logic related to the SDK. This includes the API Define for determining if we should be exporting or importing a dll function/class.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;ELBZ Project - &lt;code&gt;Test.hpp&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kr"&gt;__declspec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dllexport&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;TestLab Project - &lt;code&gt;Main.cpp&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kr"&gt;__declspec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dllimport&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="n"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see these two files show how in each project I access and use a function.&lt;/p&gt;




&lt;p&gt;Now for my API Define - this is used to automatically decide if I need to import or export the function when including the header file form ELBZ.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;code&gt;Core.hpp&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#pragma once
&lt;/span&gt;
&lt;span class="cp"&gt;#ifdef ELBZ_DEF_PLATFORM_WIN64
&lt;/span&gt;
    &lt;span class="cp"&gt;#ifdef ELBZ_DEF_OUT_TYPE_DLL
&lt;/span&gt;        &lt;span class="cp"&gt;#define ELBZ_API __declspec(dllexport)
&lt;/span&gt;    &lt;span class="cp"&gt;#else
&lt;/span&gt;        &lt;span class="cp"&gt;#define ELBZ_API __declspec(dllimport)
&lt;/span&gt;    &lt;span class="cp"&gt;#endif
&lt;/span&gt;
&lt;span class="cp"&gt;#else
&lt;/span&gt;    &lt;span class="cp"&gt;#error ELBZ Only Supports Win64
#endif
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  ELBZ Project - &lt;code&gt;Usage.hpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#pragma once
&lt;/span&gt;
&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;"Core.hpp"&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ELBZ_API&lt;/span&gt; &lt;span class="n"&gt;Test&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;public:&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  TestLab Project - &lt;code&gt;Main.hpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;ELBZ.hpp&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="n"&gt;Print&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Creating the Entry Point
&lt;/h2&gt;

&lt;p&gt;For the entry point I made my life a little easier I used a popular approach for this where the &lt;code&gt;dll&lt;/code&gt; handles the runtime definition using a pointer to the function inside of the &lt;strong&gt;TestLab&lt;/strong&gt; project to run the application here let me show you what I mean.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;ELBZ Project - &lt;code&gt;EntryPoint.hpp&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;extern&lt;/span&gt; &lt;span class="n"&gt;Application&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;NewApp&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;argc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Application&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;NewApp&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  TestLab Project - &lt;code&gt;App.cpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;ELBZ.hpp&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;TestLab&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;Application&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;TestLab&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
    &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="n"&gt;TestLab&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="n"&gt;Application&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;NewApp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;TestLab&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This here is a very common approach and I will be planning to change this later on as I have another idea of how I would like people to use the SDK to create an entry point, but for now this will stay like it is probably for a while as my plan is to just get everything working and then go back later and fix all the things that are ugly or not optimised enough.&lt;/p&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;After implementing all of this I am very happy to continue and build the next stage in this project. I am very excited for this project and I understand completely that a lot of this setup stuff before we get to rendering graphics will be similar to other software structures out there but my objective is to get things working as early as possible and then go back and change the structure if I need to for a more efficient one. So please be patient and hopefully we will have a working version of this SDK that we can use to develop some incredibly applications very soon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tomorrows Objectives
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create a Window using &lt;code&gt;Windows.h&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Setup an OpenGl Render Context with the Window&lt;/li&gt;
&lt;li&gt;Link the OpenGL Library&lt;/li&gt;
&lt;li&gt;Implement Glew for linking to modern OpenGl Usage&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback
&lt;/h2&gt;

&lt;p&gt;If you do have any feedback or ideas you would like to discuss please feel free to contact me via an-means of communication through my socials I will respond as fast as I can.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contact &amp;amp; Other Socials
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.instagram.com/estrolabz/" rel="noopener noreferrer"&gt;https://www.instagram.com/estrolabz/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/ESTROLABZ" rel="noopener noreferrer"&gt;https://www.patreon.com/c/ESTROLABZ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@estrolabzuk" rel="noopener noreferrer"&gt;https://www.youtube.com/@estrolabzuk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/estrolabz" rel="noopener noreferrer"&gt;https://github.com/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/estrolabz"&gt;https://dev.to/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@estrolabz" rel="noopener noreferrer"&gt;https://medium.com/@estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ESTROLABZ/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ESTROLABZ/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link" rel="noopener noreferrer"&gt;https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>cpp</category>
      <category>devlog</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Tutorial - How to create your own static library in C++ (WINDOWS)</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Wed, 23 Jul 2025 22:05:42 +0000</pubDate>
      <link>https://dev.to/estrolabz/tutorial-how-to-create-your-own-static-library-in-c-windows-4gbe</link>
      <guid>https://dev.to/estrolabz/tutorial-how-to-create-your-own-static-library-in-c-windows-4gbe</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Hello everyone and welcome to my first ever tutorial! In this tutorial I will walk you through how to create your own static library project from scratch in C++ with Premake5.&lt;/p&gt;

&lt;p&gt;We will be using premake5 as it allows us to write some lua code to configure our project and then create a build system for any platform we required to develop on. It is very easy to setup and this tutorial will cover it.&lt;/p&gt;

&lt;p&gt;This tutorial will be done for windows 11 currently, however future tutorials on different operating systems will be release later on but for now windows is what this tutorial will focus on. &lt;/p&gt;

&lt;p&gt;I will provide some references to other operating systems in case you would like to follow along anyways but if you come across issues they will not be directly supported in this tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You must already have knowledge of what a static library is and when to use them.&lt;/li&gt;
&lt;li&gt;Have Visual Studio 2022 installed correctly. (With C++ development addons)&lt;/li&gt;
&lt;li&gt;Basic knowledge of C++ syntax&lt;/li&gt;
&lt;li&gt;Using windows (Preferably), linux or macos.&lt;/li&gt;
&lt;li&gt;Have a basic code editor installed such as vscode, sublime or something else.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Tutorial
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Step 01 - Setting up our project directories
&lt;/h2&gt;

&lt;p&gt;So the first thing we need to do is create a folder called whatever our project is for example I will call mine &lt;code&gt;Static_Library_Project_Template&lt;/code&gt; .&lt;/p&gt;




&lt;p&gt;Next we will need to open this folder in our preferred minimal code editor, for me this is vscode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vmuzi2ywx5rq6cpmgpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vmuzi2ywx5rq6cpmgpj.png" alt=" " width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Once you have go to this stage we can create a number of folders ready to be used for our project, here is my recommended folder structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Static_Library_Project_Template
-&amp;gt; Build - This will be used to hold the premake5 binary executable.
-&amp;gt; Scripts - This will be used to hold the scripts to run the premake build 
   system creation for each platform (Windows, Linux, MacOS).
-&amp;gt; Libs - Holds all libraries in our project/solution
-&amp;gt; Apps - Holds all application in our project/solution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 02 - Setting Up our Base Configuration Files
&lt;/h2&gt;

&lt;p&gt;Next we can create the base files in our root project directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Static_Library_Project_Template
-&amp;gt; Build-Solution.lua - This file is the premake5 configuration file for 
   creating our project buld system.
-&amp;gt; .gitignore - Include this file only if you are using git
-&amp;gt; README.md - Include this file only if you are using git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Lets go ahead and start writing our configuration file in &lt;code&gt;lua&lt;/code&gt;, so to do this open your &lt;code&gt;Build-Solution.lua&lt;/code&gt; file and write the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Define a new workspace named "PROJECT_NAME"&lt;/span&gt;
&lt;span class="n"&gt;workspace&lt;/span&gt; &lt;span class="s2"&gt;"PROJECT_NAME"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Set the target architecture to 64-bit&lt;/span&gt;
    &lt;span class="n"&gt;architecture&lt;/span&gt; &lt;span class="s2"&gt;"x64"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Define 3 build configurations: DEBUG, RELEASE, and DIST (distribution)&lt;/span&gt;
    &lt;span class="n"&gt;configurations&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEBUG"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"RELEASE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"DIST"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;-- Specify the default startup project when the solution is opened&lt;/span&gt;
    &lt;span class="n"&gt;startproject&lt;/span&gt; &lt;span class="s2"&gt;"Apps/DebuggerApp"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Apply the following settings **only on Windows systems**&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"system:windows"&lt;/span&gt;
        &lt;span class="c1"&gt;-- Enable C++ exception handling using standard C++ semantics&lt;/span&gt;
        &lt;span class="n"&gt;buildoptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"/EHsc"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="c1"&gt;-- Enforce use of standard conforming preprocessor&lt;/span&gt;
                       &lt;span class="s2"&gt;"/Zc:preprocessor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="c1"&gt;-- Ensure __cplusplus macro reflects the actual C++ language version&lt;/span&gt;
                       &lt;span class="s2"&gt;"/Zc:__cplusplus"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;-- Define a variable that sets the output directory pattern based on system, architecture, and config&lt;/span&gt;
&lt;span class="n"&gt;OutputDir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"%{cfg.system}-%{cfg.architecture}/%{cfg.buildcfg}"&lt;/span&gt;

&lt;span class="c1"&gt;-- Start a new group in the solution explorer (grouping related projects)&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
    &lt;span class="c1"&gt;-- Include a Lua build script for a static library called StaticLibName&lt;/span&gt;
    &lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="s2"&gt;"Libs/StaticLibName/Build-StaticLibName.lua"&lt;/span&gt;

&lt;span class="c1"&gt;-- Return to root group (no name)&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;

&lt;span class="c1"&gt;-- Include the build script for the DebuggerApp application&lt;/span&gt;
&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="s2"&gt;"Apps/DebuggerApp/Build-DebuggerApp.lua"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So with this please not you can change the &lt;code&gt;PROJECT_NAME&lt;/code&gt; to what your project is called. You can also change the &lt;code&gt;StaticLibName&lt;/code&gt; to your library name. If you would also like you can change the &lt;code&gt;DebuggerApp&lt;/code&gt; to your own custom name however we called it this as it will only be used for testing our library works which is the reason we are creating an Executable application in our library project.&lt;/p&gt;




&lt;p&gt;So far you should have something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6och79s4hog7alou9xu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6och79s4hog7alou9xu.png" alt=" " width="800" height="363"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 03 - Next we need to install and setup premake5.exe
&lt;/h2&gt;

&lt;p&gt;We can download &lt;code&gt;premake5.exe&lt;/code&gt; from the following link:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://premake.github.io/download" rel="noopener noreferrer"&gt;https://premake.github.io/download&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure that you download the version that is for your operating system.&lt;/p&gt;




&lt;p&gt;Once downloaded we need to copy/move the &lt;code&gt;premake5.exe&lt;/code&gt; file into our Build directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd80tctckkd3is5c7b5cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd80tctckkd3is5c7b5cw.png" alt=" " width="692" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have downloaded the file and it gives me a zipped executable file, so I will now unzip this and I will have the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7mk75pojuerw1hgsckg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7mk75pojuerw1hgsckg.png" alt=" " width="635" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we go into the extracted folder and find our executable:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1soe9rsu2dqqacjn252m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1soe9rsu2dqqacjn252m.png" alt=" " width="632" height="187"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the file we must copy / move into our Build directory in our project folder so lets go ahead and do that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazv3sxc0odt39sbtqz37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fazv3sxc0odt39sbtqz37.png" alt=" " width="611" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see I have now moved this file into the correct folder and this is also what you should have too.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 04 - Windows Pre-Build Script
&lt;/h2&gt;

&lt;p&gt;In this step we need to create the windows batch script that will run &lt;code&gt;premake5.exe&lt;/code&gt; with our configuration to create our development environment based on our custom configuration.&lt;/p&gt;




&lt;p&gt;Lets start with creating a file called &lt;code&gt;Setup-Win64.bat&lt;/code&gt; in the &lt;code&gt;Scripts&lt;/code&gt; Folder:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmimn0wgscwn49q4al6u3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmimn0wgscwn49q4al6u3.png" alt=" " width="565" height="217"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Now lets write some batch script code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;off&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;REM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Disable&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;echoing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cleaner&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;pushd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;REM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Save&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;directory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;change&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;parent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;directory&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;Build\premake5.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Build-Solution.lua&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;vs2022&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;REM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Run&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Premake5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;generate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Visual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Studio&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;2022&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;project&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;using&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Build-Solution.lua&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="n"&gt;popd&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nx"&gt;REM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;directory&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Perfect now you should have something that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqunv7sr0s47qu9c9kf9r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqunv7sr0s47qu9c9kf9r.png" alt=" " width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This is great but if we were to run this batch script now we would have an error: why is that? Well you see although we created the configuration file we actually need to create our static library project and Debugger App project with a configuration file in each of these projects for this to all work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 05 - Create the Static Library Project
&lt;/h2&gt;

&lt;p&gt;So lets start by creating a folder in our &lt;code&gt;Libs&lt;/code&gt; folder called whatever it is we named our static library in our &lt;code&gt;Build-Solution&lt;/code&gt; Configuration File.&lt;/p&gt;

&lt;p&gt;For me that is &lt;code&gt;StaticLibName&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd5o85lucwkoair6n0t8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd5o85lucwkoair6n0t8.png" alt=" " width="241" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see I have created the folder called &lt;code&gt;StaticLibName&lt;/code&gt; inside of the &lt;code&gt;Libs&lt;/code&gt; folder.&lt;/p&gt;




&lt;p&gt;Next we need to create another configuration file in &lt;code&gt;lua&lt;/code&gt; called &lt;code&gt;Build-StaticLibName.lua&lt;/code&gt; . And then we must make sure we have the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Define a new project named "StaticLibName"&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt; &lt;span class="s2"&gt;"StaticLibName"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Set the project type to a static library (.lib)&lt;/span&gt;
   &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="s2"&gt;"StaticLib"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Set the programming language to C++&lt;/span&gt;
   &lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="s2"&gt;"C++"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Use the C++23 standard for compilation&lt;/span&gt;
   &lt;span class="n"&gt;cppdialect&lt;/span&gt; &lt;span class="s2"&gt;"C++23"&lt;/span&gt;

   &lt;span class="c1"&gt;-- (Temporary) set the output directory for binaries based on build config (e.g., DEBUG/RELEASE)&lt;/span&gt;
   &lt;span class="n"&gt;targetdir&lt;/span&gt; &lt;span class="s2"&gt;"Binaries/%{cfg.buildcfg}"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Use the shared C runtime (not statically linked)&lt;/span&gt;
   &lt;span class="n"&gt;staticruntime&lt;/span&gt; &lt;span class="s2"&gt;"off"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Add all header (.hpp) and source (.cpp) files from these folders to the project&lt;/span&gt;
   &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"Includes/**.hpp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Source/**.cpp"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="c1"&gt;-- Include the "Includes" folder so headers can be found during compilation&lt;/span&gt;
   &lt;span class="n"&gt;includedirs&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s2"&gt;"Includes"&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="c1"&gt;-- Set final target output path using system, architecture, config, and project name&lt;/span&gt;
   &lt;span class="n"&gt;targetdir&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"../../Binaries/"&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="n"&gt;OutputDir&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s2"&gt;"/%{prj.name}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="c1"&gt;-- Set intermediate object files output path for compiled objects&lt;/span&gt;
   &lt;span class="n"&gt;objdir&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"../../Binaries/Intermediates/"&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="n"&gt;OutputDir&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s2"&gt;"/%{prj.name}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="c1"&gt;-- Apply settings only for Windows systems&lt;/span&gt;
   &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"system:windows"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Use the latest available Windows SDK version&lt;/span&gt;
       &lt;span class="n"&gt;systemversion&lt;/span&gt; &lt;span class="s2"&gt;"latest"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Define a macro indicating the build is for 64-bit Windows&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_WIN64"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="c1"&gt;-- Apply settings for the DEBUG configuration&lt;/span&gt;
   &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:DEBUG"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro for debug builds&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_DEBUG"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Link the debug version of the runtime library&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Debug"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable debug symbols (for stepping through code in debugger)&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Apply settings for the RELEASE configuration&lt;/span&gt;
   &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:RELEASE"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro for release builds&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_RELEASE"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Link the release version of the runtime library&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Release"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable compiler optimizations&lt;/span&gt;
       &lt;span class="n"&gt;optimize&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Keep debug symbols enabled (optional, for profiling/symbolic stack traces)&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

   &lt;span class="c1"&gt;-- Apply settings for the DIST (distribution/final product) configuration&lt;/span&gt;
   &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:DIST"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro for final distribution builds&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_DIST"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Use release runtime&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Release"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable compiler optimizations&lt;/span&gt;
       &lt;span class="n"&gt;optimize&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Disable debug symbols to reduce binary size and hide internals&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"Off"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Now we have this configuration file lets write some sample code for our library:&lt;/p&gt;

&lt;p&gt;Firstly lets create two folders in the &lt;code&gt;StaticLibName&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;StaticLibName&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Includes&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Source&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;After that lets create two files a &lt;code&gt;.cpp&lt;/code&gt; and &lt;code&gt;.hpp&lt;/code&gt; file now the &lt;code&gt;.hpp&lt;/code&gt; file will go inside the Includes folder and the &lt;code&gt;.cpp&lt;/code&gt; file will go inside the source folder. The file should be named &lt;code&gt;Add.hpp&lt;/code&gt; and &lt;code&gt;Add.cpp&lt;/code&gt; .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Add.hpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;MATH&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;Add.cpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="s2"&gt;"Add.hpp"&lt;/span&gt;

&lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;MATH&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 06 - Create the Debugger App Project
&lt;/h2&gt;

&lt;p&gt;So lets start by creating a folder in our &lt;code&gt;Apps&lt;/code&gt; folder called whatever it is we named our Debugger App in our &lt;code&gt;Build-Solution&lt;/code&gt; Configuration File.&lt;/p&gt;

&lt;p&gt;For me that is &lt;code&gt;DebuggerApp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdw3c3fxrcdv5jeakqqb6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdw3c3fxrcdv5jeakqqb6.png" alt=" " width="240" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see I have created the folder called &lt;code&gt;DebuggerApp&lt;/code&gt; inside of the &lt;code&gt;Apps&lt;/code&gt; folder.&lt;/p&gt;




&lt;p&gt;Next we need to create another configuration file in &lt;code&gt;lua&lt;/code&gt; called &lt;code&gt;Build-DebuggerApp.lua&lt;/code&gt; . And then we must make sure we have the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Define a new project named "DebuggerApp"&lt;/span&gt;
&lt;span class="n"&gt;project&lt;/span&gt; &lt;span class="s2"&gt;"DebuggerApp"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Set the project type to a console application (produces .exe)&lt;/span&gt;
    &lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="s2"&gt;"ConsoleApp"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Use the C++ programming language&lt;/span&gt;
    &lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="s2"&gt;"C++"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Use the C++23 standard for compiling the code&lt;/span&gt;
    &lt;span class="n"&gt;cppdialect&lt;/span&gt; &lt;span class="s2"&gt;"C++23"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Set a temporary target output directory based on build configuration&lt;/span&gt;
    &lt;span class="n"&gt;targetdir&lt;/span&gt; &lt;span class="s2"&gt;"Binaries/%{cfg.buildcfg}"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Link against the dynamic C runtime (instead of statically)&lt;/span&gt;
    &lt;span class="n"&gt;staticruntime&lt;/span&gt; &lt;span class="s2"&gt;"off"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Add all header (.hpp) and source (.cpp) files from these folders to the project&lt;/span&gt;
    &lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"Includes/**.hpp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Source/**.cpp"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;-- Specify include directories for header file lookup during compilation&lt;/span&gt;
    &lt;span class="n"&gt;includedirs&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"Includes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                            &lt;span class="c1"&gt;-- Local project headers&lt;/span&gt;
        &lt;span class="s2"&gt;"../../Libs/StaticLibName/Includes"&lt;/span&gt;    &lt;span class="c1"&gt;-- Headers from the linked static library&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;-- Link this app against the "StaticLibName" static library&lt;/span&gt;
    &lt;span class="n"&gt;links&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"StaticLibName"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;-- Set the final output directory for the executable (organized by OS, arch, config, and project)&lt;/span&gt;
    &lt;span class="n"&gt;targetdir&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"../../Binaries/"&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;OutputDir&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="s2"&gt;"/%{prj.name}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;-- Set the intermediate directory for object files during compilation&lt;/span&gt;
    &lt;span class="n"&gt;objdir&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"../../Binaries/Intermediates/"&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;OutputDir&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="s2"&gt;"/%{prj.name}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;-- Apply the following settings only when building on Windows&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"system:windows"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Use the latest available Windows SDK&lt;/span&gt;
       &lt;span class="n"&gt;systemversion&lt;/span&gt; &lt;span class="s2"&gt;"latest"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Define a macro to indicate the build is for 64-bit Windows&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_WIN64"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;-- Configuration-specific settings for DEBUG&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:DEBUG"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro to indicate a debug build&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_DEBUG"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Use the debug runtime library&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Debug"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable debug symbols for debugging in IDEs&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Configuration-specific settings for RELEASE&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:RELEASE"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro to indicate a release build&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_RELEASE"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Use the release runtime library&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Release"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable optimizations for performance&lt;/span&gt;
       &lt;span class="n"&gt;optimize&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Keep debug symbols (optional for debugging or profiling)&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

    &lt;span class="c1"&gt;-- Configuration-specific settings for DIST (distribution/final release)&lt;/span&gt;
    &lt;span class="n"&gt;filter&lt;/span&gt; &lt;span class="s2"&gt;"configurations:DIST"&lt;/span&gt;
       &lt;span class="c1"&gt;-- Define a macro to indicate a distribution build&lt;/span&gt;
       &lt;span class="n"&gt;defines&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"DEF_DIST"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

       &lt;span class="c1"&gt;-- Use the release runtime library&lt;/span&gt;
       &lt;span class="n"&gt;runtime&lt;/span&gt; &lt;span class="s2"&gt;"Release"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Enable full compiler optimizations&lt;/span&gt;
       &lt;span class="n"&gt;optimize&lt;/span&gt; &lt;span class="s2"&gt;"On"&lt;/span&gt;

       &lt;span class="c1"&gt;-- Disable debug symbols to reduce binary size and improve load time&lt;/span&gt;
       &lt;span class="n"&gt;symbols&lt;/span&gt; &lt;span class="s2"&gt;"Off"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Now we have this configuration file lets write some sample code for our library:&lt;/p&gt;

&lt;p&gt;Firstly lets create two folders in the &lt;code&gt;DebuggerApp&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="n"&gt;DebuggerApp&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Includes&lt;/span&gt;
&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Source&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;After that lets create two files a &lt;code&gt;.cpp&lt;/code&gt; and &lt;code&gt;.hpp&lt;/code&gt; file, now the &lt;code&gt;.hpp&lt;/code&gt; file will go inside the Includes folder and the &lt;code&gt;.cpp&lt;/code&gt; file will go inside the source folder. The files should be named &lt;code&gt;Test.hpp&lt;/code&gt; and &lt;code&gt;Main.cpp&lt;/code&gt; .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;Test.hpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;iostream&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;void&lt;/span&gt; &lt;span class="n"&gt;log_test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;Main.cpp&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="s2"&gt;"Test.hpp"&lt;/span&gt;
&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hpp&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;int&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MATH&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;log_test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 07 - Running our Pre-Build Setup and Testing
&lt;/h2&gt;

&lt;p&gt;So now that we have set everything up go to a terminal inside the &lt;code&gt;Scripts&lt;/code&gt; folder like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61bth66i0yc7iendfdet.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F61bth66i0yc7iendfdet.png" alt=" " width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;And type the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\Setup-Win64.bat&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Press enter and you should see this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ybi2wwfmdzzqpnw8bic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ybi2wwfmdzzqpnw8bic.png" alt=" " width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Perfect now you can open the &lt;code&gt;PROJECT_NAME.sln&lt;/code&gt; file and it should open this window:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fej0etnitfbmiic2zylxd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fej0etnitfbmiic2zylxd.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;We can now press the &lt;code&gt;Local Window Debugger&lt;/code&gt; button with a big green arrow before it to run our solutions and see what happens.&lt;/p&gt;

&lt;p&gt;Here is what you should get:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmp21q317evrquxojndle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmp21q317evrquxojndle.png" alt=" " width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  SUCCESS
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;If you get this then well done you have SUCCESSFULLY completed this tutorial and setup your first project with a static library. :)&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Contact Information
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.instagram.com/estrolabz/" rel="noopener noreferrer"&gt;https://www.instagram.com/estrolabz/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.patreon.com/c/ESTROLABZ" rel="noopener noreferrer"&gt;https://www.patreon.com/c/ESTROLABZ&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/@estrolabzuk" rel="noopener noreferrer"&gt;https://www.youtube.com/@estrolabzuk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/estrolabz" rel="noopener noreferrer"&gt;https://github.com/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/estrolabz"&gt;https://dev.to/estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@estrolabz" rel="noopener noreferrer"&gt;https://medium.com/@estrolabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ESTROLABZ/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ESTROLABZ/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link" rel="noopener noreferrer"&gt;https://autumn-oboe-c16.notion.site/ESTROLABZ-Blog-237763e1ef908090a5fec3ea8c04331e?source=copy_link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>DAY 00 - Introduction - I am creating my own SDK from scratch in C++</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Tue, 22 Jul 2025 22:16:36 +0000</pubDate>
      <link>https://dev.to/estrolabz/day-00-introduction-i-am-creating-my-own-sdk-from-scratch-in-c-1m1e</link>
      <guid>https://dev.to/estrolabz/day-00-introduction-i-am-creating-my-own-sdk-from-scratch-in-c-1m1e</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;In this article I will go through my project idea and everything you need to know before I start working on it. As of the time of writing this article I have starting the project and I am very excited to start sharing my progress.&lt;/p&gt;

&lt;h1&gt;
  
  
  Purpose
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;So what is the reason I decided to build my own C++ SDK?&lt;/strong&gt; Well it all comes down to cyber security for me, I love the world of security and as a cyber security specialist I have been trying to find a way to make the digital world as secure as possible. This led me to using C++ to build my own SDK that can be as secure as C++ and the OS it runs on will let it, this is not 100% security but maximum possible currently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How exactly does this all work and fit together?&lt;/strong&gt; Well you see in order to produce maximum security you need full control of hardware and they only to achieve this 100% is to either build my own hardware (A future project hint hint ;)) or to use already existing hardware solutions and just write on top of that as secure as I can.&lt;/p&gt;

&lt;h1&gt;
  
  
  Objectives
&lt;/h1&gt;

&lt;p&gt;I have numerous objectives with this SDK but here are the main ones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Maximise digital security to its fullest with the tools available currently.&lt;/li&gt;
&lt;li&gt;Ensure all new applications, games, systems etc… have a standard security practice of the industry standard at the bare minimum with little to no effort from the developer.&lt;/li&gt;
&lt;li&gt;Allow 2D GUI Application Creation&lt;/li&gt;
&lt;li&gt;Allow 3D GUI Application Creation&lt;/li&gt;
&lt;li&gt;Allow CLI Application Creation&lt;/li&gt;
&lt;li&gt;Enable a new networking system to produce networking code in applications that are as secure as possible.&lt;/li&gt;
&lt;li&gt;Provide a one-stop-shop of all possible tools and resources to create new applications fast efficient and with maximum security by default.&lt;/li&gt;
&lt;li&gt;Reduce development times by 50%.&lt;/li&gt;
&lt;li&gt;Reduce development costs by 80%.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As you can see these are some ambitious objectives however I have had a long thought about each one and decided on how exactly I would achieve them. There are plenty more to come however these are the fundamentals to keep in mind as of right now.&lt;/p&gt;

&lt;h1&gt;
  
  
  Target Audience
&lt;/h1&gt;

&lt;p&gt;So who would my target audience be for this SDK?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developers (Beginners, Intermediates &amp;amp; Advanced)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My goals is to make this SDK usable and beginner friendly so that any developer new or advanced can use it to create secure and performant applications of their dreams without having to worry about cost or development time, they can just jump in little planning and start building their dream applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why choose my SDK over Others already existing?
&lt;/h1&gt;

&lt;p&gt;Well truth be told I am certain there is no SDK that can prioritise security in the way I plan too with the levels that it should be and if there is then great maybe I can learn something from it.&lt;/p&gt;

&lt;p&gt;However I want this SDK to be open source to private community members to work together to build a secure and efficient application building engine. &lt;/p&gt;

&lt;p&gt;To do this it means a lot of mistakes and problems to solve but I am always up for a challenge.&lt;/p&gt;

&lt;p&gt;The software development industry needs a change and needs it fast the way cyber attacks are taking over lets help prevent them by tackling the vulnerabilities at its core the software.&lt;/p&gt;

&lt;p&gt;That of course is just step 1 there are many other areas to tackle but lets solve one problem at a time. This is crucial to protect our digital futures or else we will all be victim to horrific cyber attacks.&lt;/p&gt;

&lt;h1&gt;
  
  
  Other Information
&lt;/h1&gt;

&lt;p&gt;Please excuse the not so great wording and explanations however I am excited to get started and just needed to get my thoughts out onto here as soon as possible. I will keep making posts about this project and keep on updating the project on my social medias also. &lt;/p&gt;

&lt;h1&gt;
  
  
  Feedback
&lt;/h1&gt;

&lt;p&gt;If you do have any feedback please feel free to reach out I will leave contact details below along with ways you can get involved if you are interested in being a part of this project!&lt;/p&gt;

&lt;p&gt;Instagram: &lt;a href="https://www.instagram.com/estrolabz/" rel="noopener noreferrer"&gt;ESTROLABZ (@estrolabz)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Patreon: &lt;a href="https://www.patreon.com/c/ESTROLABZ" rel="noopener noreferrer"&gt;Get more from ESTROLABZ on Patreon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;YouTube: &lt;a href="https://www.youtube.com/@estrolabzuk" rel="noopener noreferrer"&gt;EstroLabz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github: &lt;a href="https://github.com/estrolabz" rel="noopener noreferrer"&gt;estrolabz - Overview&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dev.to: &lt;a href="https://dev.to/estrolabz"&gt;estrolabz - dev.to&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Medium: &lt;a href="https://medium.com/@estrolabz" rel="noopener noreferrer"&gt;estrolabz – Medium&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reddit: &lt;a href="https://www.reddit.com/r/ESTROLABZ/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/ESTROLABZ/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>devlog</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Ultimate Guide to C++ Data Types: Usage Rules, Internals, and Complete Reference</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Mon, 21 Jul 2025 06:34:44 +0000</pubDate>
      <link>https://dev.to/estrolabz/the-ultimate-guide-to-c-data-types-usage-rules-internals-and-complete-reference-2gko</link>
      <guid>https://dev.to/estrolabz/the-ultimate-guide-to-c-data-types-usage-rules-internals-and-complete-reference-2gko</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;This article will cover everything a C++ beginner will ever need to know along with some useful deep dive educational information for some advanced C++ developers. In this article we will cover most C++ data types along with detailed information about the inner workings of this and even some useful checklists for you to know when to use each data type vs another. But that is not all, do you need a reference table of summary data type information well that is also included in this article.&lt;/p&gt;




&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;h2&gt;
  
  
  General Data Types
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Unsigned / Signed&lt;/th&gt;
&lt;th&gt;Size (Bits)&lt;/th&gt;
&lt;th&gt;Fixed / Dynamic&lt;/th&gt;
&lt;th&gt;Min / Max Range&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Boolean value (True / 1, False / 0)&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;0 - 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;char&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Single ASCII character like &lt;code&gt;'a'&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned &amp;amp; Signed&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Signed (-128 to 127), Unsigned (0 to 255)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;short&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smaller integer type&lt;/td&gt;
&lt;td&gt;Unsigned &amp;amp; Signed&lt;/td&gt;
&lt;td&gt;Usually 16 bits&lt;/td&gt;
&lt;td&gt;Dynamic (Platform Dependent)&lt;/td&gt;
&lt;td&gt;Signed (-32,768 to 32,767), Unsigned (0 to 65,535)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Standard integer&lt;/td&gt;
&lt;td&gt;Unsigned &amp;amp; Signed&lt;/td&gt;
&lt;td&gt;Usually 32 bits&lt;/td&gt;
&lt;td&gt;Dynamic (Platform Dependent)&lt;/td&gt;
&lt;td&gt;Signed (-2,147,483,648 to 2,147,483,647), Unsigned (0 to 4,294,967,295)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Larger whole number&lt;/td&gt;
&lt;td&gt;Unsigned &amp;amp; Signed&lt;/td&gt;
&lt;td&gt;64 bits (on 64-bit OS), 32 bits (on 32-bit OS)&lt;/td&gt;
&lt;td&gt;Dynamic (Platform Dependent)&lt;/td&gt;
&lt;td&gt;Signed 32-bit (-2,147,483,648 to 2,147,483,647), Unsigned 32-bit (0 to 4,294,967,295),&lt;br&gt;Signed 64-bit (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), Unsigned 64-bit (0 to 18,446,744,073,709,551,615)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Even larger whole number&lt;/td&gt;
&lt;td&gt;Unsigned &amp;amp; Signed&lt;/td&gt;
&lt;td&gt;Usually 64 bits&lt;/td&gt;
&lt;td&gt;Dynamic (Platform Dependent)&lt;/td&gt;
&lt;td&gt;Signed (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807), Unsigned (0 to 18,446,744,073,709,551,615)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Single precision decimal number&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±3,402,823,466.3852886&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;double&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Double precision decimal number&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±1.7976931348623157 × 10³⁰⁸&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;long double&lt;/code&gt; (GCC x86/x64)&lt;/td&gt;
&lt;td&gt;Extended precision float on GCC Linux&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Usually 80 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±1.1897314953572317 × 10⁴⁹³²&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;long double&lt;/code&gt; (Clang macOS)&lt;/td&gt;
&lt;td&gt;Extended precision float on macOS&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±1.7976931348623157 × 10³⁰⁸&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;long double&lt;/code&gt; (GCC PowerPC)&lt;/td&gt;
&lt;td&gt;Extended precision float on PPC&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;128 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±1.1897314953572317 × 10⁴⁹³²&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;long double&lt;/code&gt; (MSVC / Intel)&lt;/td&gt;
&lt;td&gt;Treated like &lt;code&gt;double&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Approx. ±1.7976931348623157 × 10³⁰⁸&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;wchar_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Wide character (GCC Linux)&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;0 to 4,294,967,295&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;char16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;UTF-16 character&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;0 to 65,535&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;char32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;UTF-32 character&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;0 to 4,294,967,295&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;void&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No value / function return type&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Fixed Width Integer Types
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Signed / Unsigned&lt;/th&gt;
&lt;th&gt;Size&lt;/th&gt;
&lt;th&gt;Min / Max Range&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed 8-bit integer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;-128 to 127&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned 8-bit integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;0 to 255&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed 16-bit integer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;-32,768 to 32,767&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned 16-bit integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;0 to 65,535&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed 32-bit integer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned 32-bit integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;0 to 4,294,967,295&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed 64-bit integer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned 64-bit integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;0 to 18,446,744,073,709,551,615&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;intptr_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed integer to store a pointer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uintptr_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned pointer-sized integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;0 to 18,446,744,073,709,551,615&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;intmax_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Largest available signed integer&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uintmax_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Largest available unsigned integer&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;0 to 18,446,744,073,709,551,615&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_least8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smallest type ≥8 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;td&gt;-128 to 127&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_least16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smallest type ≥16 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;td&gt;-32,768 to 32,767&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_least32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smallest type ≥32 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_least64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Smallest type ≥64 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_fast8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fastest type ≥8 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits*&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647 &lt;em&gt;(platform-dependent)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_fast16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fastest type ≥16 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits*&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647 &lt;em&gt;(platform-dependent)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_fast32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fastest type ≥32 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;td&gt;-2,147,483,648 to 2,147,483,647&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int_fast64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fastest type ≥64 bits (signed)&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;td&gt;-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h1&gt;
  
  
  Inner Workings
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Signed VS Unsigned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What Do “Signed” and “Unsigned” Mean?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Signed integers&lt;/strong&gt; can represent &lt;strong&gt;both negative and positive&lt;/strong&gt; numbers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsigned integers&lt;/strong&gt; can represent &lt;strong&gt;only non-negative&lt;/strong&gt; numbers (zero and positive values), but with &lt;strong&gt;double the positive range&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every integer type in C++ (e.g., &lt;code&gt;char&lt;/code&gt;, &lt;code&gt;short&lt;/code&gt;, &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;) can be &lt;strong&gt;signed&lt;/strong&gt; or &lt;strong&gt;unsigned&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Signed Range&lt;/th&gt;
&lt;th&gt;Unsigned Range&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;−2,147,483,648 to 2,147,483,647&lt;/td&gt;
&lt;td&gt;0 to 4,294,967,295&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;short&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;−32,768 to 32,767&lt;/td&gt;
&lt;td&gt;0 to 65,535&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;char&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;−128 to 127 &lt;strong&gt;or&lt;/strong&gt; 0 to 255 (impl. defined)&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Why Use Unsigned?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;When you &lt;strong&gt;never need negative numbers&lt;/strong&gt; (e.g., sizes, counts, flags)&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;increase the positive range&lt;/strong&gt; without using a larger type&lt;/li&gt;
&lt;li&gt;To &lt;strong&gt;represent raw binary data&lt;/strong&gt; safely (&lt;code&gt;uint8_t&lt;/code&gt;, &lt;code&gt;unsigned char&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Important Behavior Differences
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Signed Overflow = Undefined Behavior&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;INT_MAX&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ❌ Undefined behavior!&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Unsigned Overflow = Well-defined (Wraparound)&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;UINT_MAX&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// ✅ Becomes 0 (wraps around)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. &lt;strong&gt;Mixed Arithmetic Can Be Dangerous&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;unsigned&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// ❌ Might not work as expected!&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ Mixing signed and unsigned values in arithmetic or comparisons can lead to unexpected results due to type promotion rules.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;Recommendation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Array indices, sizes&lt;/td&gt;
&lt;td&gt;✅ Use &lt;code&gt;size_t&lt;/code&gt; (unsigned)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;General-purpose arithmetic&lt;/td&gt;
&lt;td&gt;✅ Use &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binary buffers, raw bytes&lt;/td&gt;
&lt;td&gt;✅ Use &lt;code&gt;uint8_t&lt;/code&gt;, &lt;code&gt;unsigned char&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Avoiding overflows&lt;/td&gt;
&lt;td&gt;✅ Be explicit with types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Portability and clarity&lt;/td&gt;
&lt;td&gt;✅ Avoid mixing signed/unsigned types&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Rule of Thumb
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Use signed types by default unless there’s a clear reason to use unsigned.&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;unsigned&lt;/strong&gt; only when negative values are truly invalid, and always &lt;strong&gt;guard against wraparound&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  What Does Fixed-Width Mean?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fixed-width data types&lt;/strong&gt; have a &lt;strong&gt;guaranteed, exact size in bits&lt;/strong&gt; across all platforms.&lt;/li&gt;
&lt;li&gt;Examples:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int8_t&lt;/code&gt; (8 bits)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;uint16_t&lt;/code&gt; (16 bits)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;int32_t&lt;/code&gt; (32 bits)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;uint64_t&lt;/code&gt; (64 bits)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;These come from the &lt;code&gt;&amp;lt;cstdint&amp;gt;&lt;/code&gt; header and ensure &lt;strong&gt;predictable memory usage and range&lt;/strong&gt; regardless of architecture.&lt;/p&gt;




&lt;h3&gt;
  
  
  What Does Dynamic-Width Mean?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic-width (or implementation-defined width) types&lt;/strong&gt; have a size that can &lt;strong&gt;vary depending on the compiler and platform&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Examples:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int&lt;/code&gt; (commonly 32 bits on modern platforms but not guaranteed)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;long&lt;/code&gt; (typically 32 or 64 bits depending on OS)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;char&lt;/code&gt; (always 8 bits but signedness varies)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Their size and range &lt;strong&gt;depend on hardware and compiler design&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Comparison Table
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Fixed-Width Types&lt;/th&gt;
&lt;th&gt;Dynamic-Width Types&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Size Guarantee&lt;/td&gt;
&lt;td&gt;Exact number of bits (e.g., 8, 16, 32, 64)&lt;/td&gt;
&lt;td&gt;Varies by platform/compiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Header&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;cstdint&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Built-in fundamental types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Portability&lt;/td&gt;
&lt;td&gt;High (ideal for cross-platform work)&lt;/td&gt;
&lt;td&gt;Medium to low (platform dependent)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical Use Cases&lt;/td&gt;
&lt;td&gt;Network protocols, binary files, embedded systems&lt;/td&gt;
&lt;td&gt;General programming, system APIs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Examples&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;int32_t&lt;/code&gt;, &lt;code&gt;uint64_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;, &lt;code&gt;short&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  When to Use Each
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Recommended Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cross-platform binary compatibility&lt;/td&gt;
&lt;td&gt;Fixed-width (&lt;code&gt;int32_t&lt;/code&gt;, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance-sensitive code with known hardware&lt;/td&gt;
&lt;td&gt;Dynamic-width (&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interfacing with OS or libraries&lt;/td&gt;
&lt;td&gt;Match system types (often dynamic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low-level bit manipulation or protocol parsing&lt;/td&gt;
&lt;td&gt;Fixed-width for precision&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Why Does This Matter?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;strong&gt;fixed-width types&lt;/strong&gt; avoids bugs caused by &lt;strong&gt;size or range differences&lt;/strong&gt; across platforms.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;dynamic-width types&lt;/strong&gt; can leverage platform-optimized native sizes but risks &lt;strong&gt;portability issues&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;networking, file formats, and embedded systems&lt;/strong&gt;, fixed-width types are almost always preferred.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;cstdint&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int32_t&lt;/span&gt; &lt;span class="n"&gt;fixedInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Always 32 bits&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dynamicInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// Size varies by platform (usually 32 bits on desktop)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fixed-width:&lt;/strong&gt; Exact, predictable sizes, great for portability and binary data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - &lt;strong&gt;Dynamic-width:&lt;/strong&gt; Compiler-dependent, convenient for general-purpose programming.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What Does Dynamic-Width Mean?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic-width (or implementation-defined width) types&lt;/strong&gt; have a size that can &lt;strong&gt;vary depending on the compiler and platform&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Examples:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int&lt;/code&gt; (commonly 32 bits on modern platforms but not guaranteed)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;long&lt;/code&gt; (typically 32 or 64 bits depending on OS)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;char&lt;/code&gt; (always 8 bits but signedness varies)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Their size and range &lt;strong&gt;depend on hardware and compiler design&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Comparison Table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Fixed-Width Types&lt;/th&gt;
&lt;th&gt;Dynamic-Width Types&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Size Guarantee&lt;/td&gt;
&lt;td&gt;Exact number of bits (e.g., 8, 16, 32, 64)&lt;/td&gt;
&lt;td&gt;Varies by platform/compiler&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Header&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;cstdint&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Built-in fundamental types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Portability&lt;/td&gt;
&lt;td&gt;High (ideal for cross-platform work)&lt;/td&gt;
&lt;td&gt;Medium to low (platform dependent)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical Use Cases&lt;/td&gt;
&lt;td&gt;Network protocols, binary files, embedded systems&lt;/td&gt;
&lt;td&gt;General programming, system APIs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Examples&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;int32_t&lt;/code&gt;, &lt;code&gt;uint64_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;, &lt;code&gt;short&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;When to Use Each&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Recommended Type&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cross-platform binary compatibility&lt;/td&gt;
&lt;td&gt;Fixed-width (&lt;code&gt;int32_t&lt;/code&gt;, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance-sensitive code with known hardware&lt;/td&gt;
&lt;td&gt;Dynamic-width (&lt;code&gt;int&lt;/code&gt;, &lt;code&gt;long&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interfacing with OS or libraries&lt;/td&gt;
&lt;td&gt;Match system types (often dynamic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low-level bit manipulation or protocol parsing&lt;/td&gt;
&lt;td&gt;Fixed-width for precision&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;Why Does This Matter?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;strong&gt;fixed-width types&lt;/strong&gt; avoids bugs caused by &lt;strong&gt;size or range differences&lt;/strong&gt; across platforms.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;dynamic-width types&lt;/strong&gt; can leverage platform-optimized native sizes but risks &lt;strong&gt;portability issues&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;For &lt;strong&gt;networking, file formats, and embedded systems&lt;/strong&gt;, fixed-width types are almost always preferred.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;cstdint&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int32_t&lt;/span&gt; &lt;span class="n"&gt;fixedInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Always 32 bits&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;dynamicInt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123456789&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;// Size varies by platform (usually 32 bits on desktop)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fixed-width:&lt;/strong&gt; Exact, predictable sizes, great for portability and binary data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - &lt;strong&gt;Dynamic-width:&lt;/strong&gt; Compiler-dependent, convenient for general-purpose programming.
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Min Bits vs Speed Fixed Data Type Requirements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Understanding &lt;code&gt;int_leastN_t&lt;/code&gt; vs &lt;code&gt;int_fastN_t&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;When writing portable and efficient C++ code using &lt;strong&gt;fixed-width integers&lt;/strong&gt;, you may come across two special families of types defined in &lt;code&gt;&amp;lt;cstdint&amp;gt;&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int_leastN_t&lt;/code&gt; / &lt;code&gt;uint_leastN_t&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;int_fastN_t&lt;/code&gt; / &lt;code&gt;uint_fastN_t&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are designed to give you &lt;strong&gt;more control&lt;/strong&gt; over performance or memory usage than plain types like &lt;code&gt;int8_t&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;int_leastN_t&lt;/code&gt; — &lt;em&gt;Least Width, Guaranteed Minimum Size&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;strong&gt;smallest&lt;/strong&gt; integer type that is &lt;strong&gt;at least N bits&lt;/strong&gt; wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int_least16_t&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// At least 16 bits, but possibly wider&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Memory-constrained systems (e.g., microcontrollers)&lt;/li&gt;
&lt;li&gt;You don’t care about performance, just &lt;strong&gt;minimal size and compatibility&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Guarantee:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It will &lt;strong&gt;never be narrower&lt;/strong&gt; than N bits, but could be wider depending on the platform.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;int_fastN_t&lt;/code&gt; — &lt;em&gt;Fastest Type with Minimum Width&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;strong&gt;fastest&lt;/strong&gt; integer type that is &lt;strong&gt;at least N bits&lt;/strong&gt; wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int_fast16_t&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// May be 32-bit or even 64-bit if it's faster&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance-critical code&lt;/li&gt;
&lt;li&gt;Tight loops, counters, array indexing&lt;/li&gt;
&lt;li&gt;You don’t care about memory size, just &lt;strong&gt;speed&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Guarantee:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like &lt;code&gt;int_leastN_t&lt;/code&gt;, it’s &lt;strong&gt;at least N bits&lt;/strong&gt;, but chosen by the compiler for &lt;strong&gt;best performance&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Quick Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;&lt;code&gt;int_leastN_t&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;int_fastN_t&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Minimum Size&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Efficient&lt;/td&gt;
&lt;td&gt;✅ Best&lt;/td&gt;
&lt;td&gt;❌ Not always&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance Focused&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platform Variance&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High (optimized by compiler)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Case&lt;/td&gt;
&lt;td&gt;Portability &amp;amp; Size&lt;/td&gt;
&lt;td&gt;Speed &amp;amp; Performance&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Why These Exist
&lt;/h3&gt;

&lt;p&gt;C++ runs on &lt;strong&gt;many different hardware architectures&lt;/strong&gt;. What’s fast and optimal on one platform might be inefficient on another. These types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Help write &lt;strong&gt;portable&lt;/strong&gt;, &lt;strong&gt;optimized&lt;/strong&gt;, and &lt;strong&gt;safe&lt;/strong&gt; code.&lt;/li&gt;
&lt;li&gt;Let the &lt;strong&gt;compiler decide&lt;/strong&gt; what’s best, based on your priority: speed or size.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Tip
&lt;/h3&gt;

&lt;p&gt;If you need &lt;strong&gt;exact bit-width&lt;/strong&gt;, use &lt;code&gt;intN_t&lt;/code&gt; (e.g. &lt;code&gt;int8_t&lt;/code&gt;, &lt;code&gt;int64_t&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If you're writing &lt;strong&gt;generic code&lt;/strong&gt;, and care about size or speed more than exact bits, use &lt;code&gt;int_leastN_t&lt;/code&gt; or &lt;code&gt;int_fastN_t&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Min Bits vs Speed Fixed Data Type Requirements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Understanding &lt;code&gt;int_leastN_t&lt;/code&gt; vs &lt;code&gt;int_fastN_t&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;When writing portable and efficient C++ code using &lt;strong&gt;fixed-width integers&lt;/strong&gt;, you may come across two special families of types defined in &lt;code&gt;&amp;lt;cstdint&amp;gt;&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;int_leastN_t&lt;/code&gt; / &lt;code&gt;uint_leastN_t&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;int_fastN_t&lt;/code&gt; / &lt;code&gt;uint_fastN_t&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are designed to give you &lt;strong&gt;more control&lt;/strong&gt; over performance or memory usage than plain types like &lt;code&gt;int8_t&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;int_leastN_t&lt;/code&gt; — &lt;em&gt;Least Width, Guaranteed Minimum Size&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;strong&gt;smallest&lt;/strong&gt; integer type that is &lt;strong&gt;at least N bits&lt;/strong&gt; wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int_least16_t&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// At least 16 bits, but possibly wider&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Memory-constrained systems (e.g., microcontrollers)&lt;/li&gt;
&lt;li&gt;You don’t care about performance, just &lt;strong&gt;minimal size and compatibility&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Guarantee:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It will &lt;strong&gt;never be narrower&lt;/strong&gt; than N bits, but could be wider depending on the platform.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;int_fastN_t&lt;/code&gt; — &lt;em&gt;Fastest Type with Minimum Width&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;strong&gt;fastest&lt;/strong&gt; integer type that is &lt;strong&gt;at least N bits&lt;/strong&gt; wide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int_fast16_t&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// May be 32-bit or even 64-bit if it's faster&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance-critical code&lt;/li&gt;
&lt;li&gt;Tight loops, counters, array indexing&lt;/li&gt;
&lt;li&gt;You don’t care about memory size, just &lt;strong&gt;speed&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Guarantee:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Like &lt;code&gt;int_leastN_t&lt;/code&gt;, it’s &lt;strong&gt;at least N bits&lt;/strong&gt;, but chosen by the compiler for &lt;strong&gt;best performance&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Quick Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;&lt;code&gt;int_leastN_t&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;&lt;code&gt;int_fastN_t&lt;/code&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Minimum Size&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory Efficient&lt;/td&gt;
&lt;td&gt;✅ Best&lt;/td&gt;
&lt;td&gt;❌ Not always&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance Focused&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;td&gt;✅ Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platform Variance&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High (optimized by compiler)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Case&lt;/td&gt;
&lt;td&gt;Portability &amp;amp; Size&lt;/td&gt;
&lt;td&gt;Speed &amp;amp; Performance&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Why These Exist
&lt;/h3&gt;

&lt;p&gt;C++ runs on &lt;strong&gt;many different hardware architectures&lt;/strong&gt;. What’s fast and optimal on one platform might be inefficient on another. These types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Help write &lt;strong&gt;portable&lt;/strong&gt;, &lt;strong&gt;optimized&lt;/strong&gt;, and &lt;strong&gt;safe&lt;/strong&gt; code.&lt;/li&gt;
&lt;li&gt;Let the &lt;strong&gt;compiler decide&lt;/strong&gt; what’s best, based on your priority: speed or size.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Tip
&lt;/h3&gt;

&lt;p&gt;If you need &lt;strong&gt;exact bit-width&lt;/strong&gt;, use &lt;code&gt;intN_t&lt;/code&gt; (e.g. &lt;code&gt;int8_t&lt;/code&gt;, &lt;code&gt;int64_t&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If you're writing &lt;strong&gt;generic code&lt;/strong&gt;, and care about size or speed more than exact bits, use &lt;code&gt;int_leastN_t&lt;/code&gt; or &lt;code&gt;int_fastN_t&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Usage
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Syntax
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;cstdint&amp;gt;&lt;/span&gt;&lt;span class="c1"&gt;   // for fixed-width and related types&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;cstddef&amp;gt;&lt;/span&gt;&lt;span class="c1"&gt;   // for intptr_t, uintptr_t&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Fixed-width integer types&lt;/span&gt;
    &lt;span class="kt"&gt;int8_t&lt;/span&gt;       &lt;span class="n"&gt;a_int8&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint8_t&lt;/span&gt;      &lt;span class="n"&gt;a_uint8&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int16_t&lt;/span&gt;      &lt;span class="n"&gt;a_int16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint16_t&lt;/span&gt;     &lt;span class="n"&gt;a_uint16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int32_t&lt;/span&gt;      &lt;span class="n"&gt;a_int32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2000000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt;     &lt;span class="n"&gt;a_uint32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4000000000U&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int64_t&lt;/span&gt;      &lt;span class="n"&gt;a_int64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9000000000000000000LL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint64_t&lt;/span&gt;     &lt;span class="n"&gt;a_uint64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18000000000000000000ULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Pointer-sized integers&lt;/span&gt;
    &lt;span class="kt"&gt;intptr_t&lt;/span&gt;     &lt;span class="n"&gt;a_intptr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uintptr_t&lt;/span&gt;    &lt;span class="n"&gt;a_uintptr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Maximum-width integers&lt;/span&gt;
    &lt;span class="kt"&gt;intmax_t&lt;/span&gt;     &lt;span class="n"&gt;a_intmax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9223372036854775807LL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uintmax_t&lt;/span&gt;    &lt;span class="n"&gt;a_uintmax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;18446744073709551615ULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Least-width integers&lt;/span&gt;
    &lt;span class="kt"&gt;int_least8_t&lt;/span&gt;   &lt;span class="n"&gt;a_least8&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_least16_t&lt;/span&gt;  &lt;span class="n"&gt;a_least16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;32000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_least32_t&lt;/span&gt;  &lt;span class="n"&gt;a_least32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2000000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_least64_t&lt;/span&gt;  &lt;span class="n"&gt;a_least64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9000000000000000000LL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Fastest minimum-width integers&lt;/span&gt;
    &lt;span class="kt"&gt;int_fast8_t&lt;/span&gt;    &lt;span class="n"&gt;a_fast8&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_fast16_t&lt;/span&gt;   &lt;span class="n"&gt;a_fast16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;32000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_fast32_t&lt;/span&gt;   &lt;span class="n"&gt;a_fast32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2000000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int_fast64_t&lt;/span&gt;   &lt;span class="n"&gt;a_fast64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;9000000000000000000LL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Fundamental types&lt;/span&gt;
    &lt;span class="kt"&gt;bool&lt;/span&gt;         &lt;span class="n"&gt;a_bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;char&lt;/span&gt;         &lt;span class="n"&gt;a_char&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;short&lt;/span&gt;        &lt;span class="n"&gt;a_short&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;32000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt;          &lt;span class="n"&gt;a_int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;long&lt;/span&gt;         &lt;span class="n"&gt;a_long&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000000000L&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="kt"&gt;long&lt;/span&gt;    &lt;span class="n"&gt;a_longlong&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000000000000LL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;float&lt;/span&gt;        &lt;span class="n"&gt;a_float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.14&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;double&lt;/span&gt;       &lt;span class="n"&gt;a_double&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.1415926535&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt;  &lt;span class="n"&gt;a_longdouble&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;3.141592653589793238462643383279&lt;/span&gt;&lt;span class="n"&gt;L&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;wchar_t&lt;/span&gt;      &lt;span class="n"&gt;a_wchar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;L'Ω'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;char16_t&lt;/span&gt;     &lt;span class="n"&gt;a_char16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;u'A'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;char32_t&lt;/span&gt;     &lt;span class="n"&gt;a_char32&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;U'😊'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Void pointer example (cannot declare a variable of type void)&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;        &lt;span class="n"&gt;a_voidptr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;nullptr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Output some values to prevent unused variable warnings&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"int8_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;a_int8&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"uint8_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;a_uint8&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"int16_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_int16&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"uint16_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_uint16&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"int32_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_int32&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"uint32_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_uint32&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"int64_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_int64&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"uint64_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_uint64&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"bool: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_bool&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"char: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_char&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"wchar_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_wchar&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"char16_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="k"&gt;static_cast&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a_char16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"char32_t: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="k"&gt;static_cast&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a_char32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"float: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_float&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"double: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_double&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"long double: "&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;a_longdouble&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;+a_int8&lt;/code&gt; and &lt;code&gt;+a_uint8&lt;/code&gt; are used when printing &lt;code&gt;uint8_t&lt;/code&gt;/&lt;code&gt;int8_t&lt;/code&gt; because &lt;code&gt;char&lt;/code&gt; types print as characters by default.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;void&lt;/code&gt; itself can’t be instantiated; only pointers to &lt;code&gt;void&lt;/code&gt; (&lt;code&gt;void*&lt;/code&gt;) are valid.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;char16_t&lt;/code&gt; and &lt;code&gt;char32_t&lt;/code&gt; values are cast when printing, because their types don’t directly stream to &lt;code&gt;std::cout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can modify or extend the example for your testing or documentation.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Usage Rules
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This section will provide you with a list of yes or no questions to determined which data type you need to use to store your data in c++.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decision Tree
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Q01 - Which Data do you need to store?
&lt;/h3&gt;

&lt;p&gt;Text - &lt;strong&gt;Char&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whole Number - &lt;strong&gt;Integer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Decimal Number - &lt;strong&gt;Float / Double&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Boolean True / False - Bool &lt;strong&gt;(END)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pointer / Memory Address - &lt;strong&gt;intptr_t / uintptr_t&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Q02 - Positive or Negative Values?
&lt;/h3&gt;

&lt;p&gt;Positive - &lt;strong&gt;Unsigned&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Negative / Both - &lt;strong&gt;Signed&lt;/strong&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Q04 - What size values do you need to store?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Whole &amp;amp; Decimal Numbers:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(&lt;/em&gt;&lt;strong&gt;MIN&lt;/strong&gt;&lt;em&gt;)&lt;/em&gt; 128 / 0 - (&lt;strong&gt;MAX&lt;/strong&gt;&lt;em&gt;)&lt;/em&gt; 127 / 255 -  &lt;strong&gt;8 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;MIN&lt;/strong&gt;) -32,768 / 0 - (&lt;strong&gt;MAX&lt;/strong&gt;) &lt;strong&gt;32,767 / 65,535 - **16 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;MIN&lt;/strong&gt;) -2,147,483,648 / 0 - (&lt;strong&gt;MAX&lt;/strong&gt;) &lt;em&gt;2,147,483,647&lt;/em&gt; / 4,294,967,295 - 17 Decimal Digits Precision - 32 &lt;strong&gt;Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;MIN&lt;/strong&gt;) -9,223,372,036,854,775,808 / 0 - (&lt;strong&gt;MAX&lt;/strong&gt;) &lt;em&gt;9,223,372,036,854,775,807&lt;/em&gt; / 18,446,744,073,709,551,615 - 15 decimal digits precision - &lt;strong&gt;64 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Whole Numbers Only:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maximum Bits Available - &lt;strong&gt;64 or More Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characters:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UTF-8 - &lt;strong&gt;8 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UTF-16 - &lt;strong&gt;16 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;UTF-32 - &lt;strong&gt;32 Bits&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Q03 - Do you have requirements?
&lt;/h3&gt;

&lt;p&gt;Speed? (Fast)&lt;/p&gt;

&lt;p&gt;Minimum Number of Bits? (8, 16, 32, 64)&lt;/p&gt;

&lt;h3&gt;
  
  
  Q05 - Fixed vs Dynamic Data Sizes
&lt;/h3&gt;

&lt;p&gt;Performance, Portability, Use Cases (General-purpose apps, UI, platform-specific code)  - &lt;strong&gt;Dynamic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memory Efficiency, Safer, Better Optimization, Use Cases (Embedded systems, network protocols, file formats, security-critical code) - &lt;strong&gt;Fixed&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Answer Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data Type&lt;/th&gt;
&lt;th&gt;Signed / Unsigned&lt;/th&gt;
&lt;th&gt;Fixed / Dynamic&lt;/th&gt;
&lt;th&gt;Size (Bits)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;signed char&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsigned char&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;short&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsigned short&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;32 bits (commonly)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsigned int&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;32 bits (commonly)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;32 bits (Windows), 64 bits (Unix)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsigned long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;32 bits (Windows), 64 bits (Unix)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;long long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;unsigned long long&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Dynamic&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint8_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint16_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint32_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;32 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;int64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uint64_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;intptr_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Platform-dependent: 32 bits or 64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uintptr_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Platform-dependent: 32 bits or 64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;intmax_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Maximum width supported (≥64 bits)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;uintmax_t&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;Maximum width supported (≥64 bits)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int_least8_t&lt;/code&gt; / &lt;code&gt;int_fast8_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;uint_least8_t&lt;/code&gt; / &lt;code&gt;uint_fast8_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥8 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int_least16_t&lt;/code&gt; / &lt;code&gt;int_fast16_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;uint_least16_t&lt;/code&gt; / &lt;code&gt;uint_fast16_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥16 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int_least32_t&lt;/code&gt; / &lt;code&gt;int_fast32_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥32 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;uint_least32_t&lt;/code&gt; / &lt;code&gt;uint_fast32_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥32 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;int_least64_t&lt;/code&gt; / &lt;code&gt;int_fast64_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Signed&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;uint_least64_t&lt;/code&gt; / &lt;code&gt;uint_fast64_t&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unsigned&lt;/td&gt;
&lt;td&gt;Fixed&lt;/td&gt;
&lt;td&gt;≥64 bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;void&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
      <category>datastructures</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 00: Starting a Cybersecurity Phishing Game</title>
      <dc:creator>estrolabz</dc:creator>
      <pubDate>Sun, 13 Jul 2025 06:41:41 +0000</pubDate>
      <link>https://dev.to/estrolabz/day-00-starting-a-cybersecurity-phishing-game-2113</link>
      <guid>https://dev.to/estrolabz/day-00-starting-a-cybersecurity-phishing-game-2113</guid>
      <description>&lt;p&gt;Hello Everyone!&lt;/p&gt;

&lt;p&gt;Welcome to &lt;strong&gt;Day00&lt;/strong&gt; of my new game development journey. I am starting off with a devlog series where I will document the entire process of creating a cybersecurity-themed email game - from concept to launch.&lt;/p&gt;

&lt;p&gt;This is the first game I have developed in years so there is a lot to learn. I am really excited to share it with you!&lt;/p&gt;




&lt;h1&gt;
  
  
  What is This Game?
&lt;/h1&gt;

&lt;p&gt;My first game idea is simple but powerful:&lt;/p&gt;

&lt;p&gt;You’re given a series of emails, and you must decide whether each one is real or a phishing scam (fake).&lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Real&lt;/strong&gt; - Looks legit, clean formatting, safe links.&lt;br&gt;
❌ &lt;strong&gt;Fake&lt;/strong&gt; - Suspicious sender, shady links, urgent or manipulative language.&lt;/p&gt;

&lt;p&gt;Each decision earns you points - or costs you - depending on how accurate your judgement is.&lt;/p&gt;




&lt;h1&gt;
  
  
  Why This Game Matters?
&lt;/h1&gt;

&lt;p&gt;Phishing is one of the most common cyber attacks, and it works because many people don’t know what to look for.&lt;/p&gt;

&lt;p&gt;I want this game to help players sharpen their instincts and learn key skills:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to read email headers&lt;/li&gt;
&lt;li&gt;How to spot red flags (e.g. misspellings, fake domains, threats)&lt;/li&gt;
&lt;li&gt;How phishing actually tricks you&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this game prevents even one person from getting hacked, I’ll consider that a win.&lt;/p&gt;




&lt;h1&gt;
  
  
  Tech Stack
&lt;/h1&gt;

&lt;p&gt;I’m building this in python using pygame, exporting to .exe for easy access on Windows. The focus is on the gameplay and learning - not flashy graphics, but clear, functional UI that simulates a classic inbox.&lt;/p&gt;

&lt;p&gt;So far I’ve setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic beta prototype of the core game&lt;/li&gt;
&lt;li&gt;Early idea and concept plans&lt;/li&gt;
&lt;li&gt;Email data structures for fake/real email messages.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Why I’m Sharing This?
&lt;/h1&gt;

&lt;p&gt;Part of the goal here is to build in public - showing the process day by day, mistake by mistake, win by win.&lt;/p&gt;

&lt;p&gt;You can expect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daily/Regular blog posts like this one&lt;/li&gt;
&lt;li&gt;Update Showcases on YouTube&lt;/li&gt;
&lt;li&gt;Screenshots, design idea and updates on forums and socials.&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  What's Next?
&lt;/h1&gt;

&lt;p&gt;Tomorrow I’ll be working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Planning out the game&lt;/li&gt;
&lt;li&gt;Cleaning up the beta code ready for production (only beta mode for testers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also this game doesn’t have a name yet. Got suggestions?&lt;/p&gt;




&lt;p&gt;Thanks for joining me on &lt;strong&gt;Day 00&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s build something fun and useful. More updates tomorrow 🙂&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Stay Safe Online,&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Liam, &lt;strong&gt;&lt;em&gt;Founder&lt;/em&gt;&lt;/strong&gt; - &lt;strong&gt;ESTROLABZ&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>devlog</category>
      <category>gamedev</category>
      <category>python</category>
    </item>
  </channel>
</rss>
