General C++ Programming - August 2021 (Page 2)

Help add about code
 
Write a program that accepts a 7-9 digit integer and echoes the number with commas between every three digits from the right c++. Do not use arrays, for loops, ...
[8 replies] Last: Thank you so much, everyone. (by sonnguyen0604)
by sinjac
Namespace vs. struct counter
 
Hello, I am currently making a minimalistic testing framework for on-target unit testing. I am making the framework layered, so that a named testing section con...
[2 replies] Last: Multiple files can share a namespace, and add declarations to that nam... (by kbw)
C++ project ideas and practical applications related video tutorials.
 
I have recently made the following short video tutorials with full code in C++ . I am planning to upload more of such videos in future, so please check out. ...
[2 replies] Last: Thanks for the input. There are too many online sites providing basics... (by seccpur)
Terminate thread without memory leak
 
Hello everyone, I want to implement the following logic: int global_count; // this should not be changed, like its name, its a black box void black...
[9 replies] Last: Line 18 waits for t to complete. So your code starts a thread, wait... (by dhayden)
Program is doing both for loop and if statement at the same time
 
Hello, I'm trying to code a program which will cause my nucleo board to output different symbols each time the blue user button is pressed. However, The progra...
[5 replies] Last: The task requires that the blue user button on the nucleo board switc... (by dhayden)
Cannot pass a String to Function()
 
I am trying to build a function that will process a string, and return the updated string to main.cpp. My string is built from number in Scientific Notation, 10...
[17 replies] Last: seeps, No, there is no operator==(const std::string, int); in the pro... (by rjmcinnes)
exit from while loop win32gui
 
i have 2 button in my gui the first button name is "run" and secoud button name is "stop" when i click run button while loop runing, how to stop while loop whe...
[7 replies] Last: malibor <3 Thank you very much, you helped me a lot (by Hawlong)
OpenGL ERROR E0310
 
default argument of type "const char *" is incompatible with parameter of type "char *" My code: Shader(char* vertexFile, char* fragmentFile, char* geometry...
[2 replies] Last: Ah very useful information thank you Sir (by FalconDe)
by gmeza
Help using destructors
 
Hi everyone! I am a hobbyist programmer. I used to be half decent in C, BASIC and some assembler (mostly PIC). After years without touching an IDE, I have ...
[8 replies] Last: I've made some changes for consideration. However without all the code... (by seeplus)
by helios
Writing square root in cplusplus (1,2)
 
Square root is available as the function sqrt() declared in <cmath>.
[20 replies] Last: yea we are not there yet, but it would be interesting. (by jonnin)
LNK2019/2001/1120 Errors
 
I'm getting the above error in Visual Studio 2019. I'm posting a link to a screenshot so you can see what I'm talking about. I'm happy to post code as soon as I...
[5 replies] Last: It's even better when you get that coveted "0 errors, 0 warnings". (by helios)
Error C3688 invalid literal suffix 'CLASSES_LIST'; literal operator or literal operator template 'operator ""CLASSES_LIST' ...
 
I'm getting the above error in Visual Studio 2019. I'm posting a link to two screen shots so you can see what I'm talking about. I'm happy to post code as soon ...
[7 replies] Last: Thanks (by bishoposiris)
MSVC++ 2019 and cppreference coroutine example
 
VS 2019 is supposed to have full C++20 support, so I thought I'd try the coroutine example at cppreference: https://en.cppreference.com/w/cpp/language/coroutine...
[10 replies] Last: And now, after the 16.11.1 update installed today I no longer need to ... (by George P)
Error (active) E0167 argument of type "const char *" is incompatible with parameter of type "char *"
 
I'm getting the above error in Visual Studio 2019. I'm posting a link to two screen shots so you can see what I'm talking about. I'm happy to post code as soon ...
[11 replies] Last: helios I read the info on permissive standards. I changed mine to /pe... (by bishoposiris)
Error (active) E2486 user-defined literal operator not found
 
I'm getting the above error in Visual Studio 2019. I'm posting a link to two screen shots so you can see what I'm talking about. I'm happy to post code as soo...
[3 replies] Last: this is one of a good dozen reasons why macros are best avoided if you... (by jonnin)
by Wali23
Roman Numbers
 
Extend the program so that it can deal with single digit numbers of any value. A single digit number is one that consists only of thousands, hundreds, tens, or ...
[4 replies] Last: First things first: PLEASE learn to use code tags, they make reading ... (by George P)
Debugging with GDB and Qt no longer works
 
I have been doing this code on my Windows laptop for years now, just for fun. I use an Eclipse IDE framework (the right word?) and a MinGW directory where I ...
[7 replies] Last: Found it. The Qt5Widgetsd.dll which I had downloaded from the net was ... (by Sequoia)
Remove 2 elements from a queue
 
I have a Lqueue queue from which I have to remove all elements (of type Item) with a height> 92 and also I have to remove all elements that have a greater heigh...
[4 replies] Last: int l = Q1.length(); int t = 0; int min = 92; Item i; Item j; ... (by ellosma)
free(): double free detected in tcache 2, composition
 
I am trying to simulate a simple 2-level paging mechanism, which dynamically creates new entries into the page tables. I am facing extra memory freed errors, wh...
[8 replies] Last: Thanks thmmm, to convert it change it using vectors. I was still wond... (by aay p89)
MD5 Function problem
 
i copy md5 function from this site , http://www.zedwood.com/article/cpp-md5-function Here is 3 files . main.cpp md5.cpp md5.h main.cpp #include <iostream> #...
[5 replies] Last: jonnin Thanks for reply , Ganado If you're using an IDE, it d... (by Hawlong)
August 2021 Pages: 1234
  Archived months: [jul2021] [sep2021]

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