
please wait
by Cplusc
preconditioned conjugate gradient solver
|
Hello everyone. I wrote a simple diagonal preconditioned conjugate gradient solver and I followed the steps provided below. #include <iostream> #include <ioma... |
Aug 31, 2021 at 8:55pm
[4 replies] Last: @lastchance I fixed the code. I modified the code in this thread. Than... (by Cplusc)
|
by DumbGuy
c++ saved input
|
I'm having trouble with my no_mana function i want i to stop the player from enetering the skill menu becuase he is out of mana. Even tho it does what i wanted ... |
Aug 31, 2021 at 9:27am
[11 replies] Last: the function of ItemMenu does not have branch to deal, when you intp... (by xtan)
|
by DumbGuy
Errors while calling class from other file
|
#pragma once #include <iostream> #include <stdlib.h> #include "BattleMenu.h" using namespace std; class MenuTransition{ public: int user_input; void t... |
Aug 30, 2021 at 9:21pm
[8 replies] Last: I'm running it normally without line 14 in the MenuTransition. And i'm... (by DumbGuy)
|
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 compilation times with the new C++20 features like "Modules"... |
Aug 30, 2021 at 4:11pm
[2 replies] Last: Huh. Why would it hurt build parallelism to use modules? (by helios)
|
by jacapiwsko
XOR encrypted string - decryption problem
|
Hey, I have an problem with decrypting XOR encrypted string (every char is encrypted and appended to string). I have an "key", what original string was and the ... |
Aug 30, 2021 at 3:23pm
[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 following bit of code: #include <iostream> int main() { int... |
Aug 30, 2021 at 1:53am
[22 replies] Last: As long as you didn't do anything illegal or highly immoral I didn't s... (by deleted account xyzzy)
|
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 implement it with a recursive function? print these 16 s... |
Aug 29, 2021 at 8:23pm
[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 little problem. If I execute the code below the memory seems to... |
Aug 27, 2021 at 10:21pm
[8 replies] Last: new, delete, new , delete : manual memory management the C++ way. The... (by deleted account xyzzy)
|
by ViyuPr87
What's Missing?
|
Having issues with the code below. Everything is working fine except the adding function of sum += weight. The program adds/subtracts the last number entered by... |
Aug 27, 2021 at 2:20pm
[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_EQUAL(result6, check6); What am I missing here? TEST(Ser... |
Aug 27, 2021 at 11:24am
[5 replies] Last: This link looks really good. Thank you very much. :-) (by Jakob Clausen)
|
by rhamm5798
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 floor and the balcony derived classes. 3.)If I create an objec... |
Aug 27, 2021 at 11:14am
[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 populated with values from various calculations. std::vector<doub... |
Aug 27, 2021 at 7:02am
[5 replies] Last: @mbozzi Thank you, I also found threadprivate while searching for it, ... (by sm9)
|
by raijin143
C++ Recursive function "asterisks"
|
How do I get an output something like this? Ex. Input: 5 Output: * * * * * * * * * * * * * * * Here is my code. </code> #include <iostream> us... |
Aug 26, 2021 at 5:58pm
[5 replies] Last: I don't doubt the assignment is to use recursion, but I was bored and ... (by deleted account xyzzy)
|
by mot
need help for this problem
|
1. Create an array of integers and initialize/assign random values to each element. 2. Allow the user to input an integer. 3. If the user input is present insid... |
Aug 26, 2021 at 9:17am
[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: #ifndef HUMAN_H_ #define HUMAN_H_ #include <iostream> #inclu... |
Aug 26, 2021 at 6:34am
[4 replies] Last: I just found out that I just don't have the Array header file in my Ec... (by anonymoususer13579)
|
by DumbGuy
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 0 to start the game. But i'm getting an "error C2360: initi... |
Aug 25, 2021 at 8:58pm
[11 replies] Last: Outside of the scoping issue mentioned by Grey Wolf , there is really... (by Duthomhas)
|
by Duthomhas
examples for >>
|
Oh, yeah, I remember why I lost the will to help people. They post a question, get help, then go out of their way to delete their questions . Good job, mike... |
Aug 25, 2021 at 4:33pm
[14 replies] Last: [quote=MikeyBoy]What am I supposed to have done now? Heh.™ (by deleted account xyzzy)
|
by CoolGuy43511
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); and i don't want to use like this DWORD(__stdcall* funct... |
Aug 25, 2021 at 2:35pm
[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… Take this line…. struct dirent *ent; That lines re... |
Aug 25, 2021 at 2:19pm
[3 replies] Last: struct foo { things } variable; //this makes a variable of type fo... (by jonnin)
|
by technologist
function within a function error
|
Hi, working with trying to get a function within a function to work. I get the following result: Error C3861 'printLines': identifier not found void functi... |
Aug 24, 2021 at 8:36pm
[2 replies] Last: That did it, thx. (by technologist)
|