General C++ Programming - July 2021 (Page 2)

Valgrind: segmentation fault error (1,2)
 
I have a serial code that is working perfectly and printing out data as expecxted. I rewrote a paral...
[29 replies] Last: No worries. Sorry for making you deal with my broken code. (by helios)
by helios
Forward compatibility with abstract classes
 
I just read something that I'm pretty sure is incorrect, but I wanted to make a sanity check. Sup...
[5 replies] Last: Example with four translation units: class Base { virtual int meth... (by keskiverto)
unclear variadic template recursion
 
Hi, which of the 2 codes is correct: template<class Opt> constexpr bool has() const { ...
[8 replies] Last: Okay, thank you for the explanation. (by coder777)
by Cplusc
calling methods from another class
 
I have two classes Node and element and I made a vector of each class's objects; class Node { publ...
[16 replies] Last: I do appreciate your explanations.it was helpful. (by Cplusc)
Some hard questions (maybe?)
 
Hi guys! I'm new to this forum and community. Wanted to take a second to introduce myself here. I'm ...
[4 replies] Last: I suggest making a test WAV file that just makes a constant, pure fre... (by Arcalise08)
Need slight help with adding two more code words for user to guess
 
Hey y'all, the basis of my program is similar to hangman. I want to display 3 code words out of the ...
[5 replies] Last: As a simplified and updated version, perhaps consider: #include <io... (by seeplus)
Assign array to magic hexagon
 
Hello to everyone; x y z a b c d e f g h i J k l m n o p The following c...
[5 replies] Last: your code also runs fast but still listed from 1 to 19 my c++ knowled... (by anticode)
I'm learning using string in if statement. but somehow i dont know how to make this to work.
 
#include <iostream> #include<string> using namespace std; int main() { int i; cin>>...
[5 replies] Last: // <--- The "cin" ALWAYS needs a prompt. Hmm. If the program is d... (by seeplus)
detecting a full mouse click all at once
 
Ok, so I am trying to detect a mouse-click, and am stuck detecting both a mouse down and then a mous...
[3 replies] Last: This module works: if (GetAsyncKeyState(VK_LBUTTON)<0) { ... (by technologist)
by nikee
Two outputs instead of one (1,2)
 
I made a C++ program(link here: https://replit.com/@nikegamerjjjj/NikPoloTerminal?v=1). I have a p...
[23 replies] Last: Also, instead of using >> to obtain username/password, consider using ... (by seeplus)
Is encapsulation necessary in solo projects?
 
I am currently programming a game solo. I have an Object class that has a craftingMenu() member, in ...
[11 replies] Last: So: No I don't see any use for getter and setter. Just for getter. ... (by jonnin)
I was on working something and && is not working properly
 
For my assignment I have to take sets of 3 integers separated by spaces from the user input and dete...
[6 replies] Last: Thanks JLBorges for the correction. :) (by dhayden)
by Cplusc
Sending vector of objects in c++ mpi
 
Let say I have a class named Node which makes the Node with x and y coordinate. Then I make a vector...
[6 replies] Last: Thanks (by Cplusc)
by eak006
Linked List of Shared Pointers Causes Unknown Infinite Loop
 
Hey guys, I tackled LeetCode problem #82 - Remove Duplicates From Sorted List II: - https://le...
[6 replies] Last: Perhaps I should define a destructor for ListNode class that destroys... (by helios)
by kenpry
Struggle with finishing project
 
So, Im supposed to define the member functions of the class that I created in another .cpp file. I a...
[1 reply] : See https://www.cplusplus.com/articles/Gw6AC542/ (by keskiverto)
by dune
Furthering a CPlusPlus Exercise
 
I found these exercises through a search: https://www.cplusplus.com/forum/articles/12974/ I'm down ...
[4 replies] Last: Got it covered in Line 22. But I did change Line 15 int range = max... (by dune)
send file using winsock c++
 
I am trying to send a text file from client to server and server should return that text file back t...
[4 replies] Last: I don't quite understand this shunting some file backwards and forward... (by kbw)
by Cplusc
MPI Printing result
 
I have a vector of vector and I sent it to all processors. for example mai...
[6 replies] Last: Sending to ALL processors. Note that, despite the MPI_Barrier call, yo... (by lastchance)
Everything is an object...
 
I have been working on my own project for a while, it's an OOP framework around SDL2. I've been foll...
[12 replies] Last: If you need to update a specific member on all objects Thank you fo... (by jonnin)
Ray - Sphere Intersection
 
I have an Assignment due next week, and I need help starting it. I am kind of clueless as to where t...
[12 replies] Last: Tutorial: https://www.weizmann.ac.il/sci-tea/benari/sites/sci-tea.bena... (by JLBorges)
July 2021 Pages: 12345
  Archived months: [jun2021] [aug2021]

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