Beginners - March 2020 (Page 11)

Control Class: Appending Object to Specific Array Based On User's Input
 
So I have a part of a program below that manages a collection of schools within a school board. Each school has a number of dynamically allocated students with ...
[2 replies] Last: You cannot use getNextId() when you want to add a student to a certa... (by coder777)
Need Help with AES-256-CBC
 
So I'm trying to create a wrapper function for handling AES-256-CBC on a const char* value. I'm kinda new to C++ and trying to read docs from various sites su...
[1 reply] : One obvious problem is that output is a local variable that goes out... (by AbstractionAnon)
C-String question
 
Hey again, I'm working on a program that is asking me to take 3 strings(str1,str2,str3) and replace str3 with str2 in str1.Which functions of C-strings can I...
[11 replies] Last: Jonnin, part of the assignment is in C while some of the assignment is... (by CodeNovice01)
Simple vector across files.
 
Hi, Trying to get my head back into C++. I am trying to split between a .cpp file and a .h file. I am trying to employ constructors and destructors. This ...
[4 replies] Last: So, apart from a few bells and whistles, was the main problem that I ... (by AbstractionAnon)
Debug assertion failed! vector subscript out of range
 
Hi everyone, I new to C++ and seeking for some advice from c++ experts here. I got the following error. I don't know how to fix it. Hoping someone here can assi...
[2 replies] Last: So on line 26/33 you need to use push_back(....) as you did in the pre... (by coder777)
by bsmith
Memory Leak question
 
I'm working on finding memory leaks currently with a program I'm new to. I'm running valgrind/gdb and they are showing either a memory leak int the overloaded ...
[4 replies] Last: if (current == nullptr) //if deleting last element { ... (by ne555)
Issue with compile outputing file size too small and weird warning
 
Having issue with a new warning popping up in Visual Studios 2019 when compiling my project. I recently got AES-256 implemented into my project after several da...
[2 replies] Last: so after several hours of testing I eventually fixed it by using the g... (by VaasKahnGrim)
Help needed in finding the logic of the question
 
You are given N points in a plane (numbered 1 through N); for each valid i, the i-th point is Pi=(i,Ai). There are N−1 line segments between them (numbered 1 ...
[1 reply] : This smells like a "competetive" question, where you show your skills.... (by keskiverto)
Can't insert linked list node alphabetically
 
Each node contains a title. I'm trying to insert nodes into a linked list alphabetically so that it is sorted by title. The function is called once for every so...
[3 replies] Last: You should be able to do it something like this (untested). I called t... (by dutch)
hash table quicksort function
 
Hello, I asked this question earlier http://www.cplusplus.com/forum/beginner/268612/ and it was explained good to me. But i am wondering, is quicksort or any ty...
[5 replies] Last: I am not sure why i must do the binary search, i have just been told t... (by jonnin)
by LuffyD
HELP with a UML diagram
 
I have this description of an UML diagram to make an implementation file for a shape that we need to display, and one of the functions described as: The crea...
[no replies]
Array Assistance-Not Printing, Passing Values from Function
 
This is probably another very simple error on my part, but for the life of me I cannot figure out what I'm doing wrong. My array prints on its own (when I re...
[7 replies] Last: Ganado, thanks for your help! I was able to turn them on once I looked... (by LotToLearn)
My program ends before user input is allowed and output data is not saving to the csv file properly.
 
"Append the following records to a chosen text file. Print all the values in the file to the screen. Read the values from a text file, print to screen and c...
[9 replies] Last: Hello missyredx, "main" has the biggest changes to deal with. As I s... (by Handy Andy)
by nickg
simulating a trucated normal
 
I'm interested in simulating a series of random normals truncated at upper and lower limits. In Fortran it is easy to write a code that rejects values beyond th...
[5 replies] Last: Thanks you once again (by nickg)
I get no matching function for call to and more
 
He everyone, I am a beginner and I just finished the OOP part(from a course on web) of C++ and I started a little project about a movie fanatics. I got some err...
[3 replies] Last: focus. If the message is too cryptic, look at the line it complains a... (by jonnin)
Help Needed!!
 
I am trying to create a code for a class and I am stuck.... Basically I have to use nested for loops to calculate the total flu cases for each week, determin...
[3 replies] Last: Got it!! Thanks again for all of your help! (by carsonb)
by jsurow
copy a .cpp to visual studio, but can't get it to run
 
I'm doing an online course of cpp, and I'm using the Visual Studio 2019 IDE. The course gives text files of the lessons to 'play with", with the .cpp extension....
[4 replies] Last: [quote=Niccolo]The short answer, @jsurow, is no. Not true. I import ... (by George P)
Stuck on making palindrome work for a c string
 
I am trying to implement and use the palindrome code that my instructor provided but it seems to output "is not a palindrome" for every output #include <i...
[4 replies] Last: Yeah, it was apart of one of the programs he told us to look at for re... (by Depressed)
Morse to english translator with parameters asked
 
Write your question here. #include <iostream> #include <string.h> #include <limits> /* This program translates morse code to english */ /* To close the...
[2 replies] Last: Here's an interesting way to translate morse. Just the letters, though... (by dutch)
Allowing declaration of Char Pointer in Union but not String
 
Below I have defined a union and declared a string variable in it. As expected, the compiler doesn't allow the declaration of its object because it has a string...
[1 reply] : Why are you using something as messy as a union in C++? > From what I... (by salem c)
March 2020 Pages: 1... 91011121314
  Archived months: [feb2020] [apr2020]

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