Most active questions

Advice
18 votes
19 replies
4k views

I was curious, and I decided to run my code through some detect AI code. I was getting results of 90-99% AI generated code... Except I wrote every line myself. I was getting comments such as: "...
Nameugone's user avatar
Best practices
8 votes
20 replies
590 views

I’m a computer science student who just picked up Java. What are the best practices in writing Java in 2026? Also, what are the right way in learning it? It’s a programming language that I am really ...
Jathom7's user avatar
36 votes
2 answers
2k views

Just for fun, I'm trying to write a program that detects C++ version based purely on syntactic quirks between standards. I've managed to piece together solutions for all but the newest standard. #...
Purple P's user avatar
  • 469
6 votes
1 answer
4k views

I am encountering a build error while compiling a React Native iOS project using Xcode 26.4. Environment React Native: 0.81.x Xcode: 26.4 macOS: 26.4 Error During the build process, I get the ...
Waseem Kurne's user avatar
  • 2,252
22 votes
1 answer
1k views

Assume the structure: sealed class Shape permits Circle, Quadrangle {} sealed class Quadrangle extends Shape permits Diamond, Rectangle { } final class Rectangle extends Quadrangle {} final class ...
Kacper's user avatar
  • 673
Advice
0 votes
23 replies
521 views

With the AI being so powerful, we should have a better programming language. This language is named cpluz/cz, signifying that it is generally between C and C++, but with some differences. Because its ...
jerry zhang's user avatar
14 votes
3 answers
971 views

Consider the following code: void foo(size_t len, int array[static len]) { } int main(int argc, char *argv[]) { foo(0, NULL); return 0; } The function foo declares its second parameter using ...
Parminder Singh's user avatar
Advice
1 vote
17 replies
462 views

Why do compilers put the variables of the main() function onto the stack instead of the ".data" area? It must have the same result, because it's invalid to call the main() function. int ...
DeadMaX's user avatar
  • 73
18 votes
2 answers
1k views

The C23 standard draft n3220 says the following about the conversion specifier n for fscanf in statement 7.23.6.2p12 (emphasis mine) n No input is consumed. The corresponding argument shall be a ...
timmy george's user avatar
23 votes
1 answer
919 views

It is well known that it is easy for <chrono> to silently overflow under the hood when pushing the boundaries of its range. For example: using namespace std::chrono; years y{300}; nanoseconds x{...
Howard Hinnant's user avatar
6 votes
6 answers
720 views

I have character data in an ISO 8601 format that I would like to convert to a datetime variable. I tried the following: library(lubridate) datetime_str <- "2026-04-02T02:16-04:00" dt &...
Bickford Penn's user avatar
6 votes
5 answers
658 views

I have this data set df<- structure(list(x = list(structure(c(1.2956002895122, 0.84856971403248, 0.318587376385379, 1.52311609250527, 0.761866777256873, 1.34942921531382, 1.32182157459345, 0....
lucamartono2's user avatar
Best practices
1 vote
28 replies
316 views

Suppose I have to manipulate the values inside a vector defined in C++ and the manipulation operation is to obtain the square of each value inside the vector #include<vector> #include<...
rxm's user avatar
  • 1
13 votes
3 answers
951 views

Consider the following code: char *str = "1234"; long n = strtol(str, &str, 10); The prototype of strtol() in C99 is: long strtol(const char *restrict nptr, char **restrict endptr, int ...
Parminder Singh's user avatar
Best practices
2 votes
20 replies
355 views

I'm messing with FFI between Rust and C++ and I happen to know that some particular array of bytes pointed by a std::byte * pointer is a valid C++ object of type T, which can be anything for what ...
Nicola Gigante's user avatar

15 30 50 per page
1
2 3 4 5
211