General C++ Programming - May 2020 (Page 8)

by Zero3K
Issue with an audio driver
 
I am having an issue regarding an audio driver that is written in C++. The issue is that its not playing any audio (or instead plays a short static noise) in a ...
[7 replies] Last: Also, it would be nice if someone could get it compiled with Visual St... (by Zero3K)
Template de Templates para função template.
 
Ola, estou com um problema sintático que não consigo solucionar. Tenho uma classe template: template <class T> class myclass{ code... }; e queri...
[2 replies] Last: OP, I don't understand the point of new_myclass(). If it's just going ... (by helios)
Change constexpr class members in different subclasses
 
I have a base class, with 2 static const members - the second one being a constexpr of the first one: constexpr int square(int n) { return n * n; } cl...
[1 reply] : Yes. Make it a template parameter: #include <iostream> constexpr i... (by TheToaster)
The standard and definitive algorithm of matching brace pair
 
How is the standard and definitive algorithm of matching brace pairs, as a point at a brace or within brace pair must find correctly the either or both open/clo...
[5 replies] Last: fewdiefie and cblack have quite a lot in common, it seems judging by h... (by TheToaster)
question in function ?
 
find the Greatest Common Divisor(GCD)between a number X and all positive numbers that are less than it. you should havethe following: 1- A constant global int...
[4 replies] Last: #include <iostream> using namespace std; int main() { inputNum: int... (by mjdalmalti)
Cannot compile from source with g++ on MAC OS Catalina
 
Hello, I'm on Mac OS Catalina 10.15.4, and when I compile from source with this instruction : g++-9 -c test.cpp -I /Download/project/include -I /usr/loca...
[3 replies] Last: @kbw, thank you for your response. The path is ok. These information... (by anass783)
by doggi
Restrict class from being moved or copied
 
How can I prohibit any class from being moved or copied? (std:move(), std::copy())
[3 replies] Last: This code shows the move constructor marked with "=delete", and thus u... (by Repeater)
by yoh120
What to learn after OOP?
 
So now I feel comfortable with OOP, I have tried a little bit of QT and wxWidgets, but I ended up doing the same projects that I used to make but now with GUI, ...
[5 replies] Last: I don't have anything specific in mind that I want to do, is there so... (by Ganado)
stb_image
 
I am using the famous stb_image to load some textures but I get this https://imgur.com/AtMQ6Gn instead of this https://imgur.com/hs8BUnq, any idea? I tried load...
[5 replies] Last: an additional question, do you know how to apply such skybox textures ... (by fewdiefie)
Morse code translator exception thrown line 66
 
- the program translates english to morse fine. But when translating morse to english the code breaks at line 66 and tells me exception thrown and wont translat...
[7 replies] Last: ah thanks Ganado, that fixed my issue! (by nolecelson)
Exception thrown;read access violation
 
Exception thrown: read access violation. node was nullptr. line 55 -program is supposed to translate english to morse code vice versa but the program breaks at...
[3 replies] Last: thanks! but unfortunately we have to use a Binary search tree to trans... (by nolecelson)
by dbabo
expected unqualified-id
 
hello, for some reason, I can't get the call to the parent's constructor... DHTesp.h: class DHTesp { public: ... void setup(uint8_t dhtPin) __attribute__(...
[5 replies] Last: Repeater, thank you very much. _all_ your questions make perfect sens... (by dbabo)
by frek
Why are modules called physical in cpp
 
Hi all, First, what do you think of modules in C++20, please? Are they a great advantage for the new version of cpp? And why are they called physical in cp...
[2 replies] Last: Thank you. And your opinion about the C++20 modules, please? I know t... (by frek)
Simple programm to initialize class objects
 
Dear Collegues, im new at this platform. Eventhough i had some programming experiences at college before, i haven't worked on c++ for the last couple of ye...
[12 replies] Last: ive used a *this pointer in order to print the objects. Is that an e... (by Repeater)
Checkers AI with minimaxing
 
I'm having trouble writing a minimax algorithm for my checkers game. Currently the code is written to be a two player game, but im trying to create a minimax ai...
[4 replies] Last: //variables char turn = 'B'; bool leap; bool gameStatus = true; int r... (by salem c)
"const char *" cannot be used to initialize an entity of type "char"
 
-the program is supposed to translate English to Morecode vice versa. the error is: E0144 a value of type "const char *" cannot be used to initialize an entity ...
[3 replies] Last: the first member of the struct MORSECODE is a char not a string so it ... (by fewdiefie)
c++ program translates english to morsecode ,but cant translate morsecode to english!!
 
----I dont receive any errors or warnings ----Im using visual studio 2019 ----the program translates english to morse fine, but when trying to translate morse...
[13 replies] Last: Look at that last warning message: Severity Code Description Project... (by jlb)
by BZKN
Parallel WRITE calls in parallel in C WRITE test code
 
Hi all , I am writing READ and WRITE test codes in C to read and write the data to a storage cluster. So basically the test code configures the clust...
[5 replies] Last: I would say yes, assuming these things do what i think they do just fr... (by jonnin)
Multithreading / Newbie-problems
 
Hello all, the situation is the following: As an non-professional coder, i've a quiet huge application (Windows / OpenGL / wxWidgets) that is working, but it...
[15 replies] Last: @Thomas1965 Thank you! That's very nice. I'll keep it in my mind... ... (by artganseforth)
Sift down heap help
 
I'm kinda on my wit's end with this bug. My intuition tells me it has something to do with how the memory in my array goes out of wack during my swap function. ...
[10 replies] Last: Seems like a good time to use your debugger to examine the values of ... (by MikeyBoy)
May 2020 Pages: 1... 6789
  Archived months: [apr2020] [jun2020]

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