General C++ Programming - March 2020 (Page 5)

Help with Quiz Grader
 
I am having trouble approaching this problem. I don't even know where to begin at the moment, I feel as if I know the logic but don't know how to put it into co...
[4 replies] Last: I think it's helpful to copy/paste the assignment into your source cod... (by dhayden)
Validation in classes
 
I have the following class but can't seem to figure out how to validate the inputs. //Define Default Constructor DateC::DateC() { day = 1; month = 1;...
[3 replies] Last: doug4's validateMonth() is a good start, but you'll need more. I sugge... (by dhayden)
PVS-Studio Static Analysis
 
Rob and Jason are joined by Yuri Minaev from PVS-Studio. They first discuss a blog posts on ISO’s recent decision not to break the C++ ABI in C++23 and gettin...
[no replies]
Set in Visual Studio a breakpoint, or else, in order to intercept a click on button in dockable window
 
How in Visual Studio can we set a breakpoint, or set up a hook, or do whatever else, to be able to intercept clicking on a button in dockable window being built...
[1 reply] : Buttons send either a WM_COMMAND or WM_NOTIFY message. Set your break... (by thmm)
Hollow rectangle, with X at its center whenver the entered values are both ODD.
 
I was able to make a code that displays a rectangle, whenever I input the width and length. But I have a problem, there must be an "x" in the center of the holl...
[5 replies] Last: Did you even program the original yourself or did you just find it on ... (by salem c)
by frek
Why is C still that more popular than C++!?
 
Hello all, Please look at this page: https://www.tiobe.com/tiobe-index/ Based on that major website C has been much more used and popular than C++ reaching the...
[7 replies] Last: Thanks so much for that great explanation and info. I'm also sure as a... (by frek)
Why is move() causing me trouble when constructing object?
 
Hi. I have this Tree class #ifndef GTREE_H #define GTREE_H #include <iostream> template<typename T> class Tree { struct Node { friend class Tree<T>; N...
[6 replies] Last: > why was it crashing? it was calling the copy-constructor, the defaul... (by ne555)
by Zaap
Qt random crash
 
Hi, so here is the problem. I made an ecosystem simulation with Qt. The simulation is perfectly working on 800x800m maps, but I don't know why, when I go over...
[5 replies] Last: @coder777 I'm calling a join() for each thread at line 42, so there's ... (by Zaap)
MAD (multiply addition devide) hashing question
 
Hi guys, so I've been reading this post - https://stackoverflow.com/questions/56209750/how-does-the-mad-multiply-add-divide-hashing-function-work for the pas...
[12 replies] Last: makes sense, so it's a science within itself thanks guys (by adam2016)
Decimal to Binary
 
I want to write a function that converts from decimal to binary, and I want to return the converted number in the form of an integer basically int decToBinary(i...
[3 replies] Last: some math that can help... hex and binary are directly related. so if... (by jonnin)
Throw exception: read access violation
 
I have some problem with pointer and throw exception. This is my code ifstream out_file("employee.txt"); if (!out_file) { cout << "Cannot open fi...
[8 replies] Last: #jlb Thanks for your help! It would be good recommend for me! (by PoorBoiz)
Find all occurrences
 
Say I'm given a std::list or std::vector. After taking some user inputs the vector is {1,3,5,6,5,3,4,5}. I want to return ALL the occurrences of 5 in the list....
[1 reply] : No, but you could soon write one. #include <iostream> #include <vect... (by lastchance)
have a problem with std::map when use a custom class as key
 
Here, I want to find the line appears most int a vector, but the map seems not work correctly.The element doesnt insert to the map. PRINT: A: 123 B: 566 C: 3...
[2 replies] Last: Thx dutch very much. THe cmp func does have problems. The program work... (by jeynmann)
convert an integer to Char*
 
I am trying to help someone convert this old C code to work in C++. Here is the original function char * convert (int n) { switch(n) { case 0: r...
[3 replies] Last: Since each choice of string is a fixed length... #include <iostream>... (by salem c)
Help with switching (if else loop) to (while loop) C++
 
Prompt: Write a while loop that ask the user to enter their pin. If the user enters the wrong pin tell the user they entered the incorrect pin. Give the user 3 ...
[1 reply] : for loops and while loops are semantically very similar. But if/else ... (by salem c)
by ravss2
accessing private members using base pointer
 
Hi, I have written a program just to get some understanding of how virtual pointers works w.r.t base and derived class when inherited. below is my program, the...
[8 replies] Last: when derived class overrides the base function , but function is in p... (by marhuum)
Need help learning how to detour a functtion stored in a DLL
 
So I don't have access to the sourcecode of the dll itself however I do have the function names and the exported function names themselves. what I'm wanting ...
[5 replies] Last: [quote=jonnin]visual studio used to have a depends.exe 3rd party upda... (by deleted account xyzzy)
NEED HELP FOR SCHOOL PROJECT
 
Hi, please help me. How can i change this program where in the user could input any equation to solve it? //Eulers Method to solve a differential equation ...
[4 replies] Last: input any equation to solve it? ^^ This is huge. There is a reason th... (by jonnin)
C++ sptr_t type, and also uptr_t, means
 
What should the C++ sptr_t type, and uptr_t (if not misremember it) in Win32 API mean?
[4 replies] Last: Thanks.. Good news! By you all have helped us sincerely, we have bette... (by marhuum)
Running Tests on Multiple Permutations
 
Maybe that's not the best title, but it's close. What I'm looking to do is pull a set number of characters from 3 different arrays, and then run permutations on...
[3 replies] Last: Ok, Thanks for the help. I will look over those and test them out to s... (by thatguy413)
March 2020 Pages: 1... 34567
  Archived months: [feb2020] [apr2020]

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