Blog

Page 275 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for What are the differences between .so and .dylib on macOS?
c#macos

What are the differences between .so and .dylib on macOS?

Published on September 2, 2023

# .so vs .dylib: Demystifying macOS Dynamic Libraries If you're a developer working on macOS, you might have encountered the confusion surrounding the differences between .so and .dylib. Fear not, as we're here to shed some light on this topic and provide

Cover Image for Why malloc+memset is slower than calloc?
c#

Why malloc+memset is slower than calloc?

Published on September 2, 2023

šŸ” **Why malloc+memset is slower than calloc?** Have you ever wondered why `calloc` seems to be faster than `malloc` followed by `memset`? šŸ¤” In theory, they both allocate memory, but there seems to be a significant performance difference. Let's dive into

Cover Image for Write applications in C or C++ for Android?
androidc#

Write applications in C or C++ for Android?

Published on September 2, 2023

šŸ“¢ Calling all game developers! šŸŽ® Are you looking to port your C game to Android but hitting a roadblock with Java's domination? Fear not šŸ™…ā€ā™‚ļø, because I've got some good news for you! šŸ‘ You can indeed write applications in C or C++ for Android! šŸ“±šŸ’Ŗ W

Cover Image for How to prevent SIGPIPEs (or handle them properly)
c#io

How to prevent SIGPIPEs (or handle them properly)

Published on September 2, 2023

šŸ“ **Title: Preventing SIGPIPEs: Keeping Your Server Crash-Free** šŸ’„ Have you ever encountered the dreaded SIGPIPE error that crashes your server program? We know the struggle! In this blog post, we'll dive into the common issues surrounding SIGPIPEs and

Cover Image for What"s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?
c#

What"s the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?

Published on September 2, 2023

# What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__? If you are a beginner in C++ programming, chances are you have come across the terms `__PRETTY_FUNCTION__`, `__FUNCTION__`, and `__func__` while reading code or researching onlin

Cover Image for how to use #ifdef with an OR condition?
c#

how to use #ifdef with an OR condition?

Published on September 2, 2023

# How to Use #ifdef with an OR Condition? šŸ¤” Having trouble setting an OR condition in the `#ifdef` directive? No worries, we've got you covered! In this blog post, we'll help you understand the proper way to use the `#ifdef` directive with an OR conditio

Cover Image for How can I autoformat/indent C code in vim?
c#

How can I autoformat/indent C code in vim?

Published on September 2, 2023

# Autoformatting/Indenting C code in Vim šŸš€ So, you've come across some messy C code and you want to bring it back to its pristine, well-indented glory in Vim? Fear not! In this blog post, we'll explore some common issues related to autoformatting C code

Cover Image for Is bool a native C type?
booleanc#gcc

Is bool a native C type?

Published on September 2, 2023

šŸ“ **Title: Bool in C: Unraveling the Mystery** šŸ“· Image: [Illustration of a C code snippet with a question mark](image-link) Are you puzzled by the presence of `bool` in the Linux kernel code? You might be wondering, isn't `bool` a C++ type? šŸ¤” Don't wo

Cover Image for How to achieve function overloading in C?
c#overloading

How to achieve function overloading in C?

Published on September 2, 2023

# Achieving Function Overloading in C: A Guide to Bridging the Gap šŸ“¢ Calling all C programmers! Are you tired of not being able to achieve function overloading in C? Do you find yourself longing for the simplicity and flexibility of this powerful feature

Blog | Matheus Mello