Beginners - June 2022 (Page 4)

Is there anyways to make this less complex?
 
I have to delete a node in Binary Search Tree. But somehow my testcase take too much space to run. C...
[3 replies] Last: Deleting a node in a binary search tree is not trivial. There are seve... (by seeplus)
Error: MATLAB vs C++ output
 
I am converting a MATLAB code to a C++ and running into small differences b/w my two codes. For s...
[7 replies] Last: @jonnin Okay, I was able to fix the main "out of band issue" and get ... (by JamieAl)
Character/ASCII - Question
 
I am fairly new to C++ and still learning. I understand the first code is casting a char into an...
[5 replies] Last: [quote=copypasta]I am fairly new to C++ and still learning. There is ... (by deleted account xyzzy)
Switch statement??
 
Hi guys, I'm putting a switch statement in a loop, for example with 3 cases as below. How do I make ...
[2 replies] Last: Don't use a switch statement. You expect to input one number, then ano... (by dhayden)
how to prevent array of ints from edits
 
Have array of ints, dynamically filled... Need to use the data from array, but prevent it from writ...
[9 replies] Last: Im 100% sure nothing amends the original contents, it's magic number ... (by dhayden)
Scientific Computing - Debugging Tools (1,2)
 
Greetings! As a PhD student, I usually write programs from the domains of physical simulations, num...
[20 replies] Last: I usually write programs from the domains of physical simulations, n... (by seeplus)
Student's Basic Information and Grades
 
Create a program that would let the user manage students' basic information and grades on a number o...
[1 reply] : L9 & 10 - you need to specify the size of the arrays. In C++ the size ... (by seeplus)
by jNc
Compile two cpp files with QT Creator
 
Hi, folks! Need to compile: #ifndef TEST_H #define TEST_H int a = 0; void simplePrint (...
[13 replies] Last: I need to use data set with Base class with derived classes.. Great,... (by mbozzi)
Pong game (SFML) (1,2)
 
I picked up this book on SFML, "Beginning C++ Game Programming" & I am learning a lot. I am able to ...
[34 replies] Last: Thanks George, I will have to hit the Win32 API eventually as well and... (by CodeChaser)
Ant simulator
 
How do I solve my problem where my if statement doesn't follow parameters #include<iostream> #in...
[5 replies] Last: [quote=salem c]Don't try and run code until you've fixed all the issue... (by deleted account xyzzy)
Edmonds-Karp for Max Flow having timeout
 
Hello there :) So here's the thing: I've written a code for the Edmonds-Karp Algorithm for Max Flow...
[4 replies] Last: Oh wow, thanks. I think now I understand the stuff that went wrong wit... (by Mae4ashy)
C++ vs MATLAB syntax: Incorrect results
 
This is a pretty simple question, I am not sure what I am missing. MATLAB code: Nx = 10; Ny...
[2 replies] Last: @lastchance wow, you're right I have no idea how I couldn't see it. Th... (by JamieAl)
by ksh02
Replacing a local object causes warnings (deprecated-copy)
 
Hi C++ forum, I have an issue regarding this snippet StringSeq result = StringSeq(seq); for (Va...
[4 replies] Last: StringSeq& StringSeq::operator=(StringSeq const& other) { data = o... (by seeplus)
2D Array
 
Hello, i want to add a function that determines whether in the component of the matrix A exists a ma...
[1 reply] : Here's how geeksforgeeks would do it: https://www.geeksforgeeks.org/ch... (by newbieg)
Is this an appropriate use of std::optional?
 
Hi I have a container class along the following lines: template <class T> class Container { p...
[1 reply] : I think option one is the best choice. The interface is appealing: v... (by mbozzi)
read 2D array from file
 
Greetings! What's the current best way to read in a 2D double array from a file? The structure sho...
[6 replies] Last: Cheers, then I got it! (by PhysicsIsFun)
I want to make a book system
 
I'm making a book system, although I'm stuck. My goal is to let a user input another book if he/she...
[3 replies] Last: OK, let's not get into dynamic memory just yet (it will be desirable l... (by newbieg)
how do i convert a unicode number into a char
 
I want to convert a Unicode number into a char, like how you can with an ASCII number, for example, ...
[2 replies] Last: Each character that exists in the Unicode standard is unambiguously id... (by kigar64551)
Spaces / Columns
 
Hey so I have a question regarding something about spaces. ok so lets say the program uses input fr...
[14 replies] Last: C++20 String Formatting Library: An Overview and Use with Custom Types... (by againtry)
expected a ; even though it's a function
 
I'm building a library system for my project, then as I was writing my code, I got an error about ...
[3 replies] Last: Oh, wait, I figured it out, Thanks Peter87 The problem was I assigned... (by grahams)
June 2022 Pages: 12345
  Archived months: [may2022] [jul2022]

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