General C++ Programming - August 2021

preconditioned conjugate gradient solver
 
Hello everyone. I wrote a simple diagonal preconditioned conjugate gradient solver and I followed th...
[4 replies] Last: @lastchance I fixed the code. I modified the code in this thread. Than... (by resabzr)
c++ saved input
 
I'm having trouble with my no_mana function i want i to stop the player from enetering the skill men...
[11 replies] Last: the function of ItemMenu does not have branch to deal, when you intp... (by xtan)
Errors while calling class from other file
 
#pragma once #include <iostream> #include <stdlib.h> #include "BattleMenu.h" using namespace std; ...
[8 replies] Last: I'm running it normally without line 14 in the MenuTransition. And i'm... (by DumbGuy)
by rempas
How much C++20 features will speed up the compilation time in practice?
 
I've searched pretty much everywhere but I can't find a single source that has benchmarks about the ...
[2 replies] Last: Huh. Why would it hurt build parallelism to use modules? (by helios)
XOR encrypted string - decryption problem
 
Hey, I have an problem with decrypting XOR encrypted string (every char is encrypted and appended to...
[6 replies] Last: what is key? is "AES" your test case? a quick google tells me that... (by jonnin)
Lambda capture copying requires mutable declaration (1,2)
 
I'm not really understanding why the foo() lambda requires being declared as mutable in the foll...
[22 replies] Last: As long as you didn't do anything illegal or highly immoral I didn't s... (by Furry Guy)
by Setat
sum of nodes in a tree.
 
Hello,I have a tree with "x" in the root. How can I print the sum of these node? Is it possible to...
[9 replies] Last: Yes, it's not a complete tree, just a part of it. I agree, Keskiverto'... (by Setat)
Problem with free() and virtual memory
 
Hello everybody, I am working with the malloc(), calloc() and free() functions and I am having a lit...
[8 replies] Last: new, delete, new , delete : manual memory management the C++ way. The... (by Furry Guy)
What's Missing?
 
Having issues with the code below. Everything is working fine except the adding function of sum += w...
[12 replies] Last: I think the use of comma operator is ugly as heck. (by Ganado)
Serialize signed values
 
I am trying to serialize data using a stringstream. I ran the following test, and it failed at CHECK...
[5 replies] Last: This link looks really good. Thank you very much. :-) (by Jakob Clausen)
Abstract Class Question (no code)
 
1.) In my Abstract base class I have an array called seats . 2.) I have two types of seats, the flo...
[7 replies] Last: I thought if I made it protected in the base Abstract class "Theater"... (by doug4)
by sm9
OpenMP parallelisation - how to make variables that last through the lifetime for each thread
 
Hi all, I am trying to parallelise a for loop in C++ with openmp. In each loop a vector is populate...
[5 replies] Last: @mbozzi Thank you, I also found threadprivate while searching for it, ... (by sm9)
C++ Recursive function "asterisks"
 
How do I get an output something like this? Ex. Input: 5 Output: * * * * * * * * * * * * * * ...
[5 replies] Last: I don't doubt the assignment is to use recursion, but I was bored and ... (by Furry Guy)
by mot
need help for this problem
 
1. Create an array of integers and initialize/assign random values to each element. 2. Allow the use...
[5 replies] Last: @mot, If you change your lines for ( i = 0; i < array_size; i++) { ... (by lastchance)
Type "ArrayList" could not be resolved in eclipse
 
I have the following code with a header, a CPP code, and a driver code. Here is the header code: #...
[4 replies] Last: I just found out that I just don't have the Array header file in my Ec... (by anonymoususer13579)
c++ call class from on file to another
 
I'm trying to call my class CharacterMenu from my other file so i can start it after the user inputs...
[11 replies] Last: Outside of the scoping issue mentioned by Grey Wolf , there is really... (by Duthomhas)
examples for >>
 
Oh, yeah, I remember why I lost the will to help people. They post a question, get help, then go...
[14 replies] Last: [quote=MikeyBoy]What am I supposed to have done now? Heh.™ (by Furry Guy)
is it possible to use function pointer like this?
 
---sorry for my bad english--- i want to use like this (DWORD(__stdcall*)(DWORD))0x12345678(10); ...
[1 reply] : You just need another pair of parentheses: ((DWORD(__stdcall*)(DWORD... (by coder777)
by Kmpck
Question about pointer objects
 
Question about pointer objects Hi guys! I am trying to study and understand something… ...
[3 replies] Last: struct foo { things } variable; //this makes a variable of type fo... (by jonnin)
function within a function error
 
Hi, working with trying to get a function within a function to work. I get the following result: Er...
[2 replies] Last: That did it, thx. (by technologist)
August 2021 Pages: 1234
  Archived months: [jul2021]

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