General C++ Programming - June 2020

about temporary objects...
 
It is said about C++ 17, that if expressions instead of names are passed to decltype(auto), then the...
[3 replies] Last: Thanks to the both of you!! Regards, Juan (by JUANDENT)
Trying to define a homogeneous value list with a variadic template
 
Hi, I came across the following code which I do not understand: template< auto v1, decltype...
[7 replies] Last: dutch I was trying to speed up my understanding; the link is large wit... (by JUANDENT)
Should I pass a struct by the struct for string?
 
I have a struct like this: struct Token { std::string type; std::string token; } ...
[5 replies] Last: If two tokens have the same "token" but different types, are they the ... (by dhayden)
by volang
Doing lower layer stuff (1,2)
 
Is there a library in c++ (or another languge) that lets me handle tcp synack, tls and that stuff on...
[31 replies] Last: But before, I printed out of the received data without touching it(no ... (by jonnin)
How many exponent digits displayed on output?
 
http://www.cplusplus.com/reference/ios/scientific/ says "Finally, this notation always include...
[1 reply] : 3 supports 999 digits. remember that 1.23 e2 is 123. e3 is 1230. floa... (by jonnin)
Computer as a player
 
Hello there, I wanna add the Computer as a Player, if there are only 3 player who play the game. M...
[3 replies] Last: Oh lord! Thank you so much! (by QatarAirways)
Multiple function definition
 
Goodmorning everyone, I'm facing a linker error that i can't solve. I create a program that after ...
[1 reply] : must give us sufficient C++ code and its build messages (by marhuum)
what is the difference between declaring a lambda as constexpr vrs returning constexpr?
 
What is the difference between these 2 lambdas? auto squared4 = (auto val) constexpr { ret...
[4 replies] Last: this code you provide does not compile does too: https://wandbox.org... (by Cubbi)
DXT5 data to rgba image converter
 
Hello all. I am currently trying to create a "data" to rgba image viewer. My DXT5 data is in the fo...
[7 replies] Last: https://www.file-extensions.org/pak-file-extension The first thing to ... (by salem c)
by bibo
Mutate passed 2d vector later
 
Comparator(const vector<vector<int>>& arr) : mat(arr){}; bool yo(const mp& p1, const mp& p2) ...
[4 replies] Last: Wow, TLE error vanished. Thanks :) (by bibo)
by bibo
OperatorOverloading with a state variable
 
typedef pair<int,int> mp; class Comparator { public: vector<vector<int>> mat; Compa...
[2 replies] Last: typedef priority_queue <mp, vector<mp>, Comparator> mypq_type; mypq... (by bibo)
does blocked thread go to the ready queue?
 
if main thread is blocked by calling thread::join(), does blocked thread go to the ready queue? ...
[2 replies] Last: // salem c Thank you! I got it! (by woohyeon)
C++ disassembler project
 
I am creating a c++ disassembler (coverts from Machine code to RISC-V) project, and I am in the proc...
[2 replies] Last: I see your point; thank you. I corrected it (by Jack Van Stone)
Random Number from an Array
 
Hello there! I wanna know if there is any posibility to get a random number from Array? I want to ...
[7 replies] Last: Alas, even the seed_seq might be problematic That's what I meant by ... (by dutch)
should I use decltype(auto) or auto for return type?
 
Hi, I have this code.. I don't know if operator() should return decltype(auto) or auto. What is ...
[2 replies] Last: thanks!! (by JUANDENT)
file->SendRequest retreiving ANSI encoding
 
Hello All, I hope you are fine.. Please, I am doing a C++ request: file->SendRequest (class CHttpF...
[no replies]
non-constexpr lambda marked constexpr should not compile
 
According to C++ 17, the following code should not compile: auto squared2 = (auto val) cons...
[2 replies] Last: Makes sense... I agree VStudio hasn't implemented this error reporting... (by JUANDENT)
Should I put #include"" or #include<> first?
 
Is there a different to doing: #inlcude "file.h" #include <iostream> rather than: ...
[1 reply] : Depends entirely on what is inside file.h. But generally speaking, no... (by Ganado)
In what order are translation units linked?
 
I have a VStudio 2019 project with many .cpp files. I copied some code and did some chnages and now ...
[8 replies] Last: thanks! (by JUANDENT)
[SDL] randomly changing movement
 
Hi guys, right now with the following code, the movements of the rectangle are quite compound, the ...
[5 replies] Last: Whenever the 'virtual' wall appears the rectangle is rejected. I would... (by coder777)
June 2020 Pages: 123... 6
  Archived months: [may2020] [jul2020]

This is an archived page. To post a new message, go to the current page.