
please wait
by JUANDENT
indirectly_readable is false for std::optional??
|
Hi, I do not understand the following: The resulting value when applying the operator* is the same reference type for const and non-const objects... and... |
Jan 28, 2023 at 5:35am
[1 reply] : The resulting value when applying the operator* is the same reference... (by mbozzi)
|
by malibor
TEXT like behavior of the function?
|
I have a lengthy function that is bloated because there doesn't seem to be a way to assign generic string with string literal on same line. example: #include ... |
Jan 27, 2023 at 4:48pm
[5 replies] Last: Awesome solution and no performance penalty, I like it! Macros again s... (by malibor)
|
by JUANDENT
trick with type_identity_t
|
Hi, I do not understand the following code: template<typename From, typename To> concept ConvertsWithoutNarrowing = requires (From && x) { std::type_identi... |
Jan 25, 2023 at 11:26pm
[2 replies] Last: type_identity_t<To > is used here to satisfy an arbitrary restrictio... (by mbozzi)
|
by JUANDENT
std::compare_three_way not compiling
|
Hi, I have this code: template<typename T> struct Value { T val{}; auto operator<=>(const Value& rhs) const noexcept(noexcept(val<=>val)) { ... |
Jan 25, 2023 at 2:43pm
[6 replies] Last: cppreference has excellent examples on how to use C++ stdlib functiona... (by deleted account xyzzy)
|
by a7300235
(c++ stl thread) what happen when constructing threads without join() or detach()?
|
code below: #include<iostream> #include<thread> using namespace std; int main() { thread t1( (){cout<<"t1"<<endl;}); // without calling ... |
Jan 24, 2023 at 3:34pm
[3 replies] Last: Please do not post the same question in multiple forums. https://cplus... (by AbstractionAnon)
|
by malibor
Conditionally use function with templates
|
Generic sample code: #include <string> #include <type_traits> #include <cuchar> template<typename StringType> requires std::is_same_v<typename StringType::... |
Jan 23, 2023 at 5:41pm
[5 replies] Last: template < std::ranges::input_range STR > requires requires { int... (by JLBorges)
|
by malibor
Internal compiler error MSVC
|
Creating a new thread since the previous one is solved: https://cplusplus.com/forum/general/285225/ There is a different issue right now, and I would like to a... |
Jan 23, 2023 at 3:30pm
[3 replies] Last: It's the latest compiler version and I was compiling with std:c++20 G... (by malibor)
|
by malibor
What is the "z" prefix in string literals?
|
Sample string: std::string str = "z\u00df\u6c34\U0001F34C"; // or u8"zß水🍌" I don't understand nor can I fin any information about the "z" prefix in th... |
Jan 23, 2023 at 10:44am
[3 replies] Last: lol, silly me... Now that you said that it actually makes sense. (by malibor)
|
by malibor
Can UTF-16 file be BOM-less?
|
UTF-8 encoded file may or may not have BOM in it, does the same apply to UTF-16? Can there be UTF-16 file without BOM? I mean is it a usual scenario like wi... |
Jan 22, 2023 at 4:22pm
[2 replies] Last: Thanks, I see, therefore it's possible for UTF-16 file be without BOM.... (by malibor)
|
by malibor
regex_search icase
|
Sample code: #include <regex> #include <string> int main() { std::wregex regex; std::wstring line; // This compiles std::regex_search(line,... |
Jan 22, 2023 at 2:21pm
[7 replies] Last: The expensive part of constructing a typical regex is probably the pro... (by mbozzi)
|
by Hawlong
convert string to hex
|
Hello all , Please how can convert this string to hex .. string packet = "11101111000001010110000"; |
Jan 21, 2023 at 1:22pm
[11 replies] Last: thanks so much Ganado , Working good Thanks for the notes jonnin ... (by Hawlong)
|
by Bengbers
Different behavior in Debugger or normal application
|
Hi, I'm trying to develop a socket application in Linux (I don't know if it's a specific socket problem, by the way) and am running into reading problems. W... |
Jan 20, 2023 at 9:07pm
[3 replies] Last: It took 15 minutes to install valgrind and receive the following: ==1... (by Bengbers)
|
by Hawlong
how can replace and add to array
|
#include <iostream> using namespace std; // function to convert decimal to binary void decToBinary(int n) { // array to store binary number int binar... |
Jan 20, 2023 at 2:57pm
[6 replies] Last: Thanks so much seeplus , solved (by Hawlong)
|
by Mobo01
KMP algorithm's time complexity
|
I'm attempting to implement strstr using the KMP method. This is the algorithm described on scaler topics; I also watched this video https://www.scaler.com/topi... |
Jan 17, 2023 at 9:00pm
[4 replies] Last: [quote=seeplus]As for once I'm feeling in a goof mood.. Typo?? Eithe... (by deleted account xyzzy)
|
by malibor
regex_match issue
|
I never used regex in cpp and I'm having issue with the following sample: int main() { // Get line length until ';' character with regex std::wstring line =... |
Jan 16, 2023 at 4:20pm
[no replies]
|
by Zaneemma
File manager
|
Someone Please help Tools: - C++ - SDL 1.2.15 - CodeBlocks 20.03 Functionality: 1) Checking the catalog structure: – program searches through sub-cat... |
Jan 16, 2023 at 9:56am
[3 replies] Last: @zaneemma - What is your knowledge of C++? Do you know about std::file... (by seeplus)
|
by PeteDD
Link-time undefined reference to a class object (revisiting...)
|
This issue eludes me … once again. Undefined reference to a class object. It is similar to one we looked at earlier, but the answer does not seem to be simi... |
Jan 12, 2023 at 4:48pm
[7 replies] Last: You could make myADC a pointer Or a function-local static variable (... (by mbozzi)
|
by LukeProducts
Neural Network does not work the right way
|
Hi all, I have recently been working on a C++ NeuralNetwork class and wanted to feed it with image data to be able to decide if the image data shows a cat or... |
Jan 3, 2023 at 3:29pm
[7 replies] Last: Hey, this is a C++ forum, not a BASIC forum! :) (by Ganado)
|
by Duthomhas
vcpkg + Boost + ICU + Windows 10
|
Anyone familiar with vcpkg on Windows? I just installed it and then ran the vcpkg install boost-locale boost-regex boost --triplet x64-windo... |
Jan 2, 2023 at 2:56pm
[12 replies] Last: The amusing part of this discussion about vcpkg is I have (for me) a n... (by deleted account xyzzy)
|