Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Search
Yes, it's possible. In a more general way, every recursive algorithm can be converted to an iterative one (and vice-versa). You just need to use a stack. Internally, a recursive function will use...
What does ptr() mean in this code? An expression like ptr followed by parentheses as in ptr() is a function call. In your example, ptr is a variable of type "pointer to function" because of t...
The typical way to do something like this without involving recursion would be to build an array and iterate through that. However, in this case, recursion is a more appropriate option. With tree ...
At some extent, you can ask about (programming-related) software recommendations if you manage to narrow down the scope to something specific. A question like "which one of compiler x and compiler ...
Welcome! It's best if the code being reviewed is here on the site, for ease of reference and defense against link rot. That sounds like a sizable program; are there key parts you'd like review on...
Shouldn't it be a category of Software Development too? Probably not Unless it is a very specific question as in the examples provided by Lundin which are clearly related to software developm...
Is it legal ISO C to declare a function as noreturn with a non-void return type (but of course not actually returning)? As far as I can read from the standard, it seems legal. Example: noreturn ...
Void pointers are compatible with every other object pointer type and as mentioned in another answer, 7.21.6/10 speaks of the type of the pointed at object, not the type of the pointer. This is con...
Wrong operator. To test for NULL, use the IS NULL and IS NOT NULL operators ... You cannot use arithmetic comparison operators such as =, <, or <> to test for NULL.
As Stack Exchange (Stack Overflow mostly) is struggling to deal with outdated answers, they came with a proposal that we can learn from: Version labels for answers As already most of the feedback...
Generally these questions are fine, though they should come with specific examples, so that they become clearer and can get narrowed-down. I've done a lot of self-answered Q&A here and the hard...
I think that questions about programming paradigms fall under the umbrella of "questions about software design or software architecture" and are thus on topic. There have also been several questio...
I have a Makefile in my Jenkins job's workspace, that I want to edit out certain parts from and then save it, before running next part of the script that uses this Makefile. The part that I want t...
There's one big difficulty with the proposed pattern. Enum instances are singleton instances of their particular class, and in general two enums from different classes are not equal even if they wr...
To understand the concept of recursive tree traversal, I would like to give you an analogy. Imagine a labyrinth of rooms connected like a tree structure. That is, there is an entry to the first r...
The concept that is important to understand here is the concept of operator precedence. Assume you have an expression a + b * c. What does it mean? You could have the following options: (a + b) ...
Let's say I have a variant that can hold a bunch of different types of values (say I got them from parsing a JSON or similar). using Value = std::variant<std::monostate, int, double, std::strin...
Say we have an abstract class Foo declared as so: class Foo { public: virtual void test() = 0; }; Let's say that we make a derived concrete class FooDerived, and decide to mark it's ve...
This scenario is not yet a problem for this site, but we will get there, since it's a huge problem for Stack Overflow: Someone just picks up a well-known programming language for the first time. T...
Yes I would allow UI/UX questions with some limitations. Examples: on topic - UI/UX questions related to an interface that also involves some programming (e.g. web interfaces) offtopic -...
I've noticed that a lot of sites have something like this going on: <div class="has-margin-0 has-padding-4"> <div>...</div> <div>...</div> ... </div>...
How can I get an email when I get a notification on Codidact? I missed an answer because I thought I would get an email for it.
In addition to Q&A, Codidact supports another post type, article. Articles can be used for blog posts, wiki pages, and other resources. Articles, like questions, use tags, so searching for a ...
Now that we've had a few of these answers, I really don't like them. It seems there are three separate problems with the ChatGPT answers we have seen: Quote-only. Just like we don't allow link-o...
So I was looking around for some async solutions and I found one on github, https://github.com/electronicarts/ea-async I follow the setup instructions for maven. Only to realize it didn't work (I ...