Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Score of 1
1 answer
110 views

I understand that initializing an array in kotlin is pretty straight-forward if you know the items to put in the array. In my situation, I know how many elements at run time, not during compile time. ...
Score of -2
3 answers
242 views

Can I declare a variable along with a pointer? //like this struct node n1,n2,n3,*start; //or do i have to do it separately struct node *start;struct node n1,n2,n3; to declare variable alongside ...
Score of 4
2 answers
172 views

In The C++ Programming Language 4th edition, in §6.3, page 153, I read Any declaration that specifies a value is a definition Again, in §15.2, page 421, a declaration with an initializer is always ...
Score of 1
0 answers
131 views

I have a class definition with a method declaration struct DemoClass{ int operation(int i); }; and a method definition afterwards int DemoClass::operation(int const i){ return i+1; } the ...
Score of 5
2 answers
331 views

I usually referred to C17, but decided to switch to C23. And looking through the C23 standard, I saw that the sentence from C17 was deleted in C23: A declaration other than a static_assert ...
Score of 2
3 answers
309 views

I have a Foo class that includes an array and a static constexpr variable. As a general convention, I want to write public and private variables respectively. But, compiler error occurs 's_array_size' ...
Score of 3
2 answers
158 views

I found this paragraph in C17(6.7.9 #1): initializer: assignment-expression { initializer-list } { initializer-list , } initializer-list: designation{opt} initializer initializer-...
Score of 3
2 answers
242 views

In C17 we have this(6.7.6.2 #3): If, in the declaration “T D1”, D1 has one of the forms:  D [ type-qualifier-listopt assignment-expressionopt ]  D [ type-qualifier-listopt assignment-expression ]  D [...
Score of 13
4 answers
1322 views

This question comes from an attempt to understand the "C philosophy" and not from any "real problem". Suppose that in a C program I use sin(x): #include <stdio.h> int main() ...
Score of -2
1 answer
82 views

namespace ns { class MyClass { private: int value; MyClass(int val) : value(val) {} friend MyClass operator"" _myudl(unsigned long long int val); // Friend UDL declaration ...
Score of 0
3 answers
149 views

Is it wrong to declare simple variables like int, double, bool, var, String, List inside callback function? (Which is generally nested within the build method.) For, example, I have a ...
Score of 2
1 answer
125 views

In the [basic.scope.temp] section of the C++ standard, it is mentioned: 6.4.9 Template parameter scope Each template template-parameter introduces a template parameter scope that includes the ...
Score of 0
2 answers
74 views

kind of an odd question, is there a way to lookup a list of values and for the ones that don't exist use an alias and do a lookup on that instead. matching codes/alias table (say this table doesn't ...
Score of 0
3 answers
1405 views

I'm coming from the React world, and I'm trying to learn Svelte 5. Suppose I have the following file: // types.ts export interface Person { name: string; } In React, I can import the Person ...
Score of 0
1 answer
110 views

I have a file #include <stdint.h> // starting at 0xFFFFFFFF going upwards uint32_t stackpointers[32]; typedef enum { READY, BUSY, DONE }State; struct TCB_entry { struct Thread thread; ...
user avatar

15 30 50 per page
1
2 3 4 5
231