• Feed
  • Discussions
define

define

#define
0 followers·3 articles

define

#define·0 followers·3 articles
define
Kim Lillås
Kim Lillås
owningmymistakes.hashnode.dev·Feb 07, 2024
Feb 07, 2024

Careful about function-like macro parameter naming

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) ...

Discuss·4 reads
C++
Jyotiprakash Mishra
Jyotiprakash Mishra
blog.jyotiprakash.org·Dec 24, 2023
Dec 24, 2023

#define should be used more often

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 ...

Discuss·17 reads
define

Changelog

New steps component and improved accessibility on Hashnode's blog and docs product.

New steps component and improved accessibility on Hashnode's blog and docs product.

Nov 05, 2024·
new

Trending Articles

Decoding the XYZ Confidence Score: Your Smartest Trading Signal Yet

Ekemini David ·24 reads

Price reduction in wifimap app

Wissy Ak·32 reads

Staying Grounded in Chaos: How AgentXYZ Helps You Trade with Clarity

Ekemini David ·25 reads

Top commenters this week

Writing Challenges

#2Articles1Week Challenge

Become better at technical writing; accept Hashnode's writing challenge for four weeks.

#2Articles1Week Challenge
#WomenWhoTech

Share your story, achievements, or experiences as a woman, non-binary folk in tech or as a #WomenWhoTech ally!

#WomenWhoTech
Self Starter

Publish your first article on Hashnode and become a self starter!

Self Starter
Serial Blogger

Publish an article every day for 7 days and earn a cool serial blogger badge!

Serial Blogger
Talk of the town

Write a story that drives amazing engagement on Hashnode and become the talk of the town!

Talk of the town
Word Warrior

Write an in-depth article on your Hashnode blog that's more than 2000 words and become a word warrior!

Word Warrior
Deepak Kumar
Deepak Kumar
Sajid Ahmed
Sajid Ahmed
Mayank Arora
Mayank Arora
VIPERTOTO >> Situs Judi Online Aman & Terpercaya di Indonesia.
VIPERTOTO >> Situs Judi Online Aman & Terpercaya di Indonesia.
Marcus A. Baker
Marcus A. Baker