General C++ Programming - October 2021 (Page 4)

by Hanske
Using Qt to emit a signal in Python
 
I am trying to send a `.hdf5` file to a method in the main python file in the class here: class DesignerMainWindow(QtGui.QMainWindow, Ui_MainWindow): ...
[4 replies] Last: https://wiki.qt.io/Qt_for_Python_Signals_and_Slots I can't see how th... (by againtry)
Help in Visual Studio C++
 
Ask the user the name of the person the bill is being calculated for. Ask the user how many months worth of data they want to enter (up to 12). As...
[5 replies] Last: I guess the OP didn't feel like they had a warm and friendly receptio... (by againtry)
How to manage windows navigation with GTK library C++
 
I'm using GTK library to make a simple GUI for my application but I'm getting some problem to manage windows navigation. In particular, I'm not able to come bac...
[1 reply] : Have you figured this out yet? IIRC fullscreen assumes that the fulls... (by Duthomhas)
Need help with compilation error (1,2)
 
Hi I am trying to implement the below logic to find the largest sum of vector {5, 9, 7, 11} is sum of elements 9 and 11, which is 20. Can anyone tell me wha...
[24 replies] Last: hi mbozzi I have modified my code as per your suggestions and tested ... (by denver2020)
wrong answer
 
I have code like: #include <bits/stdc++.h> unsigned LFSR2(unsigned lfsr2, unsigned start_state2, unsigned bit2) { unsigned period = 0; do { ...
[5 replies] Last: @The Gray Wolf Thanks! (by prog2222)
Adding a counter?
 
Hello, I currently have a problem that I am working on that entails a recursive coin counter that does not include global variables or loops. I have gotten mos...
[1 reply] : First, posting code with code tags makes it easier to read and refer t... (by keskiverto)
Overloading endl
 
Does anyone have a working example of overloading std::ostream and std::streambuf? I want to accumulate text in the streambuf until a std::endl is detected. At...
[2 replies] Last: Thanks ne555 . That did the trick. You're right, friend is not ne... (by AbstractionAnon)
Adding More Functionality To Occurrence Program.
 
This is my current code, it counts the number of words that do not begin with the letter d, no matter the case. and the number of words beginning with letter d,...
[9 replies] Last: I know, it was an example. I didn't want to write the entire assignmen... (by Ganado)
How to construct a closed dodecahedronal graph?
 
I want to re-code the ancient game Hunt The Wumpus. Therefore I want to connect the rooms of the cave to a dodecahedronal graph with a room at each corner. Some...
[5 replies] Last: #include <iostream> #include <map> #include <set> using namespace std... (by lastchance)
Functions Lab
 
Need help to see what I did wrong and/or what am I missing The formula to compute watts generated per day (represented by w) w=g(〖s/25)〗^3 where g is the ...
[13 replies] Last: 1000 watts = 1 kilowatt 1000000 watts = 1 megawatt You need to do this... (by Ganado)
float, double and long double ranges ?
 
Hi guys Does anyone knows the type number ranges of float double long double Thanks in advance
[5 replies] Last: Thank you all #include <iostream> #include <cfloat> int main() {... (by forgottencoder)
Error: "corrupted size vs. prev_size Aborted"
 
Hey! I am not sure what this error means, never got it before. I don't know why would I get this error when my code was running perfectly few days ago? corr...
[5 replies] Last: @salem c Thanks for the suggestion! I started committing everything o... (by JamieAl)
C++ Occurrence Task
 
Have this code given by instructor, instructor said it only needs 3-4 lines of code to do what it says and im confused what to do can anyone code it for me so I...
[11 replies] Last: OK L21: dCount += static_cast<char>(std::toupper(static_cast<unsign... (by seeplus)
Multiplying Matrixes
 
I have made a function that take a matrix I input, takes its determinant, and its inverse then multiplies its inverse with the original matrix to give an identi...
[3 replies] Last: "Ridiculously small numbers" instead of 0 exactly is possible with flo... (by lastchance)
std::cout is out function
 
How can I make std::cout out function? I mean that std::cout should be only in main(). I commented this lines (12-13) below. int foo(int *poly, int *init_s...
[7 replies] Last: do one thing and do it well that's one of the purpose of «don't use i... (by ne555)
Visual Studio 2019 can't import header files
 
I think this may be a path issue but I can't account for it. In Visual Studio 2019 I'm trying to import source files for a C++ project but it keeps telling me ...
[1 reply] : In the Solutions Explorer pane select the Release (or Debug or whateve... (by Duthomhas)
by Cplusc
solver for system of linear equation
 
Hello everyone. I write a conjugate gradient and preconditioned conjugate gradient solver and they are working fine. I am using these solvers in finite diffe...
[3 replies] Last: Also I used this solver http://www.cplusplus.com/forum/general/222617/... (by Cplusc)
need ideas of this code
 
#include<bits/stdc++.h> using namespace std; //Using the bool statement let user re-enter phone number bool Vaild_areacode(const string&phone_length) { //...
[3 replies] Last: #include <iostream> #include <random> int main() { std::default_r... (by George P)
Need help getting loop to work with data from input file.
 
I have .txt file of 26 grades that looks like: 76 89 150 135 200 76 12 100 150 28 178 189 167 200 175 150 87 99 129 149 176 200 87 35 157 189 I need my progra...
[6 replies] Last: Thank you all for the help. I used seeplus' advice and it worked. Th... (by tmneveu)
by xUcme
BMI Calculator outputting 0.00
 
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int weight; int height; int BMI; printf("Enter a weight (kg) : "); scanf_...
[2 replies] Last: In c/c++, if the two numbers being divided are both int, then the resu... (by seeplus)
October 2021 Pages: 12345
  Archived months: [sep2021] [nov2021]

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