Beginners - April 2020 (Page 9)

Runtime error: Cannot dereference end list iterator
 
I am trying to implement quick sort with the median of three as my pivot. My list is of key value pairs, I am trying to save the middle key in order to compare ...
[2 replies] Last: Ahh okay! I used back() instead and it worked. Thanks for the help! (by Jorge626)
by Aushi
Program Crashing?
 
Super beginner so please don't judge too harshly! If you select any random number (outside of the ones in the switch construct), and then select 6, whether it i...
[10 replies] Last: Question, do you really need to store the menu items in an array calle... (by TheToaster)
How to Peel the Orange - or - How to Learn Enough to Become Engaged
 
Good evening, folks. I'm someone with a novice understanding of C++ who aims to make a career out of it someday. As with many, I'm going to be an Indie Gamed...
[14 replies] Last: I thought about your dilemma a little further, and maybe what you migh... (by highwayman)
Spelling program
 
Hello I have a question. I need to read in words from a line from a file. for example if the first sentence contains apples aples apppples, i need to be a...
[9 replies] Last: Hello Double O, PLEASE ALWAYS USE CODE TAGS (the <> formatting butt... (by Handy Andy)
cant access a private member using friend
 
i cant access (name) here is the code: class employee{ public: void setName(string,double); void print(); employee(); employee(string,...
[3 replies] Last: An alternative found here: https://stackoverflow.com/questions/1252262... (by Enoizat)
by Zanza
Hierarchy chart?
 
I'm making a grading program and I'm required to have a hierarchy chart. The problem is my instructions are quite vague on how to actually properly make one. I'...
[3 replies] Last: Okay so the assignment is to turn my original grading program into one... (by Zanza)
ifstream not reading .txt file properly
 
Hi there. I am trying to use ifstream inFS(inFile) to read in lines of a .txt file. Each line consists of either strings or integers. Ultimately I want to parse...
[3 replies] Last: I don't think that the question is dumb. I have never seen this proble... (by thmm)
constraining class method parameters?
 
Hi everybody, I'm new here and to c++ in general, so please consider me a total novice. I'm in the process of learning c++; as an exercise I'm writing a simp...
[4 replies] Last: I avoid throwing exceptions as much as possible. People tend to not c... (by dhayden)
Advice on how to structure
 
Hi, So, I'm trying to create a program that: 1) Reads in numbers (separated by a comma) from a text file. 2) Put these into a class that has member variables f...
[4 replies] Last: Thank you very much! That appears to have worked! (by Thunderchook)
by munim
how to fill other indexes of array after breaking it ... (1,2)
 
i am working on my college project it is about hospital management system. all i want that the user enter patient record and the loop of array break after filli...
[20 replies] Last: There are no standard C++ functions to clear the screen or read a char... (by dutch)
exception thrown visual studio
 
I'm working on my lab for a class and my code is throwing an exception and I'm not sure how to fix it. I would really appreciate some help on what to do because...
[2 replies] Last: char* Name; char* Team; Why are you not using std::string for thes... (by salem c)
by DJL
reading input files
 
Hello, I have been using visual studio code with the code runner ext. on the mac.I cant seem to get the terminal to input a file. I have been trying to impo...
[1 reply] : I am inputing: c:/users/#####/desktop/####.txt Please, try to be a b... (by Enoizat)
for loop Array issue.
 
I'm confused why I'm getting Errors for my for loop //========================================================== // // Title: Lab01 // Course: ...
[6 replies] Last: @ Ganado, Thanks. Now and then I get lucky. I caught it when I tried ... (by Handy Andy)
Time complexity of quick find
 
Hi guys so I am following a pdf on princetons coursera algorithms course, it basically tells me the quick find algorithm ( I'm guessing the unionNodes functio...
[7 replies] Last: That's a tough choice. For CS calculus and probability are the least u... (by helios)
How to copy certain elements from one vector to another
 
I have a vector that has multiple party names repeated, here's a sample; Unaffiliated Federalist Democratic-Republican Democratic-Republican Republican ...
[5 replies] Last: In other words the goal is not "use of C++", but "to learn to think". ... (by keskiverto)
Stacks help (1,2,3,4)
 
Hello, I have this assignment For this assignment, write a program that uses a single stack to check whether a string containing braces, parentheses, an...
[77 replies] Last: Good news everyone -- the thread has been marked as resolved! So, is... (by deleted account xyzzy)
by Hay9
Delete line in file
 
Hello, I want to write information in a file for my game like: Dwarve G 656 275 481 481 32 2 which is working with my code "File << *PlayerS.get..." as below. T...
[5 replies] Last: Hello Hay9, Since you are learning the same as I am let me cover some... (by Handy Andy)
out of memory allocating (1,2)
 
I get the following error: cc1plus.exe: out of memory allocating 105621144 bytes make: *** [main.o] Error 1 "make all" terminated with exit code 2. Buil...
[20 replies] Last: Once I compiled the Sqlite3 amalgation(~7.5MB) and didn't have any pro... (by thmm)
Even and Odd Arrays
 
This code seems to assign an odd to the even array. int main() { int range; int score; cout << "Please enter a number between 1 to 5: "; cin >> ran...
[10 replies] Last: cblack618 is a liar and a cheat. Do not help him. * this is an autom... (by dutch)
Binary Tree (1,2)
 
For this assignment, design an EmployeeInfo class that holds the following employee information: Employee ID Number: an integer Employee Name: a string I...
[25 replies] Last: cblack618 is a liar and a cheat. Do not help him...... * this is an ... (by dutch)
April 2020 Pages: 1... 7891011... 20
  Archived months: [mar2020] [may2020]

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