this post was submitted on 28 Jun 2023
6 points (100.0% liked)
Programming
43 readers
1 users here now
This magazine is dedicated to discussions on programming languages, software development, and coding. Whether you are a beginner programmer or an experienced developer, this is the place for you. Here you can share your knowledge, ask questions, and engage in discussions on topics such as coding languages, software engineering, web development, and more. From the latest trends and frameworks to tips and tricks for debugging, this category covers a wide range of topics related to programming.
founded 2 years ago
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Where appropriate, I split code like this into separate files (I like to have similarly named files in separate directories) with multiple build configurations. I'll tell the build system to compile different files for each configuration. I like this because it keeps the code clean and avoids using the preprocessor