• Forum
  • General C++ Programming

General C++ Programming

by admin
Welcome to this board!
Welcome to the general programming forum in C++.com! In this forum, users can to talk about any topic related to programming in the C++ language that does not ...
[no replies]
Multithreading in a dll
I wanted to make two functions running in the background at the same time inside dll My dll #include <Windows.h> #include <iostream> DWORD WINAPI MainT...
[no replies]
Read / Write Array Of Byte (1,2)
Hello all , Please how can read , Array Of Byte (cheat engine). using c ++ (internal) https://i.top4top.io/p_2581t632y1.png
[39 replies] Last: @GeorgeP: Don't you mean something like this: SimpleClass* obj_p... (by DizzyDon)
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...
[1 reply] : The resulting value when applying the operator* is the same reference... (by mbozzi)
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 ...
[5 replies] Last: Awesome solution and no performance penalty, I like it! Macros again s... (by malibor)
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...
[2 replies] Last: type_identity_t<To > is used here to satisfy an arbitrary restrictio... (by mbozzi)
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)) { ...
[6 replies] Last: cppreference has excellent examples on how to use C++ stdlib functiona... (by George P)
(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 ...
[3 replies] Last: Please do not post the same question in multiple forums. https://cplus... (by AbstractionAnon)
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::...
[5 replies] Last: template < std::ranges::input_range STR > requires requires { int... (by JLBorges)
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...
[3 replies] Last: It's the latest compiler version and I was compiling with std:c++20 G... (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...
[3 replies] Last: lol, silly me... Now that you said that it actually makes sense. (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...
[2 replies] Last: Thanks, I see, therefore it's possible for UTF-16 file be without BOM.... (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,...
[7 replies] Last: The expensive part of constructing a typical regex is probably the pro... (by mbozzi)
convert string to hex
Hello all , Please how can convert this string to hex .. string packet = "11101111000001010110000";
[11 replies] Last: thanks so much Ganado , Working good Thanks for the notes jonnin ... (by Hawlong)
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...
[3 replies] Last: It took 15 minutes to install valgrind and receive the following: ==1... (by Bengbers)
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...
[6 replies] Last: Thanks so much seeplus , solved (by Hawlong)
implementation of simple class for raspberry pi pwm blink program (Embedded Programming) (1,2)
Hi guys, Please, could you help me with this? I have been working on this simple project to make the LED blink which is hooked onto the GPIO pins of a RPi 4 us...
[25 replies] Last: A couple of things to note, coming from someone who is a still-learnin... (by George P)
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...
[4 replies] Last: [quote=seeplus]As for once I'm feeling in a goof mood.. Typo?? Eithe... (by George P)
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 =...
[no replies]
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...
[3 replies] Last: @zaneemma - What is your knowledge of C++? Do you know about std::file... (by seeplus)
Pages: 123
  Archived months: [nov2022]