---
title: "#define articles | Hashnode"
description: "Explore 4 articles tagged #define on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/define"
---

Tag

# #define

4 posts · 0 followers

[Kim Lillås](https://hashnode.com/@klillas) · [Feb 7, 2024](https://hashnode.com/posts/careful-about-function-like-macro-parameter-naming/65c3d59da7fd587166d7478e)

### [Careful about function-like macro parameter naming](https://owningmymistakes.hashnode.dev/careful-about-function-like-macro-parameter-naming?utm_source=hashnode&utm_medium=feed)

I needed to create a function-like macro which set a parameter in a default settings struct, simple enough. struct Settings { unsigned enabled; }; struct Settings defaultSettings; #define SetEnabled(enabled) (defaultSettings.enabled = enabled) ...

1 min read · [owningmymistakes.hashnode.dev](https://owningmymistakes.hashnode.dev/careful-about-function-like-macro-parameter-naming?utm_source=hashnode&utm_medium=feed)

[Jyotiprakash Mishra](https://hashnode.com/@jpmishra) · [Dec 24, 2023](https://hashnode.com/posts/define-should-be-used-more-often/658855dbcfbadbee57840e55)

### [#define should be used more often](https://blog.jyotiprakash.org/define-should-be-used-more-often?utm_source=hashnode&utm_medium=feed)

The #define directive in C is used for creating macros, constants, and inline functions. Let's go through examples of each: Constants using #define: Defining a constant using #define. #include <stdio.h> // Define a constant #define ...

2 min read · [blog.jyotiprakash.org](https://blog.jyotiprakash.org/define-should-be-used-more-often?utm_source=hashnode&utm_medium=feed)
