Skip to main content

Questions tagged [c++]

Programming questions are off-topic here. Do not ask questions about how to write code in C++. However, conceptual questions about computer science are more appropriate. See our help center for the scope of this site.

9 votes
4 answers
8k views

I am currently learning about how the compilation and linking works in C++. I think I kinda get how the compiler works, and that for a file to fully compile you don't need to have function ...
artas2357's user avatar
  • 193
6 votes
1 answer
1k views

We have data types like int and long etc. which can store just a few bytes of integers. But when we are implementing ...
Yuv's user avatar
  • 139
6 votes
1 answer
939 views

C++ templates have type variables and can express lambdas, so they must have System F embedded. But is that exactly where they are located in the lambda cube? Can C++ templates produce new types or ...
BetterOffAlone's user avatar
5 votes
4 answers
770 views

I've been tasked with hashing arbitrary types in C++, with the caveat that A == B implies hash(A) == hash(B) even if equality of ...
etha7's user avatar
  • 51
5 votes
1 answer
482 views

C++ and Java include native classes for linked lists, C++ std::list and Java LinkedList For C++ std::list, nodes can be "moved" within a list, or from list to list (if the lists are compatible), via ...
rcgldr's user avatar
  • 374
4 votes
1 answer
999 views

struct and class in C++ are nearly identical (as covered for example here). But why is this so? What did happen when C++ was ...
hyde's user avatar
  • 153
4 votes
0 answers
79 views

Trying to understand how compiler/static-type-checker checks for subtyping, I run into 2 problems. 1. Reachability in DAG Since both Python/C++ support multiple inheriatnce, the types can be ...
mq7's user avatar
  • 141
3 votes
1 answer
837 views

What are good approximations for computing log1pexp for single precision and double precision floating point numbers? Note: ...
Yashas's user avatar
  • 285
3 votes
1 answer
333 views

I've started learning C++, and I know a little bit of C. Something that always struck me as somewhat off was that the address-of operator is represented with the seemingly random ampersand (&) ...
Nat H's user avatar
  • 31
3 votes
4 answers
694 views

The operation I'm interested in is a slight twist on your standard search-and-replace operation, in that instead of a single pair of arguments (replaceme and ...
Jeremy Friesner's user avatar
3 votes
2 answers
128 views

I just solved the following Leetcode problem: All Paths From Source to Target Here is my solution: ...
Platus's user avatar
  • 127
3 votes
1 answer
733 views

As the functions are of 2 type:1.Pre-defined/library functions,2.User defined functions. What type of function is main() function? This doubt comes in my mind while writing a program we define the ...
Harsh Kumar's user avatar
3 votes
1 answer
3k views

I'm working on the problem: Count smaller elements on right side using Set in C++ STL The solution is to add each element to the set and then to count the elements on the left, the distance function ...
user248884's user avatar
3 votes
0 answers
215 views

I'm implementing a stable integer sorting algorithm, I've chosen radix sort. I've tested LSD vs MSD implementation, wrote MSD/LSD hybrid implementation to reduce bandwidth pressure. The repo is here: ...
Kirill Lykov's user avatar
3 votes
0 answers
139 views

Coming from non-computer science background, I am trying to understand the different types of equivalence and equality usually used in type theory. Ideally, I am looking for clear definitions and ...
Vincent's user avatar
  • 221

15 30 50 per page
1
2 3 4 5
7