Beginners - June 2021

17 errors with cpp file
 
I have to write a ArrayDictionary.cpp file that follows the ArrayDictionary.h file listed below. The purpose of the h file is An array-based implementation of t...
[9 replies] Last: You still have const errors on isEmpty() findEntryIndex() getValue(... (by AbstractionAnon)
cant use vector erase?
 
I am trying to use the erase function belonging to vector, but I am getting errors and I can not figure out why. I am getting different errors for it, but the o...
[4 replies] Last: That is much more succinct, thanks. (by Ganado)
by Wedde
What does std::flush really do?
 
When looking at videos and tutorial text flush seems to be used as a way to empty the stream, to not risk of having characters etc end up in places you did not ...
[5 replies] Last: > There are plenty of time when you need to flush a stream or file to ... (by JLBorges)
Topic closed
 
I have to write a ArrayDictionary.cpp file that follows the ArrayDictionary.h file listed below. The purpose of the h file is An array-based implementation of t...
[5 replies] Last: @Lacy9265 Take it as a bonus and badge of honor in coming up against @... (by againtry)
Template Based Error:
 
As a part of creating an AVL tree, i ran into the following error when debugging:"error: no matching function for call to ‘getline(std::basic_string&, std::st...
[4 replies] Last: Thank you so much. i corrected my code as suggested and it work! also ... (by jaymann)
function needs to return two values, havent used structures/pointers before
 
Hello, I've got a problem in which I have a program where I am to find the gross and net pay of an employee when they give their hours worked and pay rate. My o...
[3 replies] Last: Yes. Reference parameters are effectively making an alias -- the para... (by jonnin)
How can I make a vector of objects then print it's contents out?
 
The program I am making I wish to choose 2 values for an object, and then add them to a vector , my problem is I can't print them out through a function c...
[3 replies] Last: #include <iostream> #include <vector> class x { int a,b; p... (by Manga)
by Wedde
Read file to class members.
 
I have managed to read a string to a class member. My problem is that i want to read to four different class members (one string, three int) In the .txt file th...
[10 replies] Last: Yes i intend to, this is one part of a bigger program that simulates a... (by Wedde)
Confused on using the switch?
 
Im writing a program that shows a menu of the choice then ask the user to choice. So I need to use a switch statement to o ask the user to enter an integer ...
[8 replies] Last: Also the cout... can be after the switch as well. The only thing neede... (by seeplus)
calculating large factorials
 
Hello everbody, I am given an integer n that can be at most 10^8. Now, I have to calculate the factorial of that number. I have been struggling with this probl...
[9 replies] Last: hey thanks alot, lastchance :) (by closed account E093605o)
text file handling
 
One can save the file on notepad or word and one can also open the file through clicking on it and read or write in it through cursor instead of using ifstream ...
[1 reply] : > One can save the file on notepad or word and one can also open the f... (by salem c)
by vboro
Starting a for() loop in case of a linked list from Nth node?
 
Heyy! When creating a linked list from a struct array of countries, I have come across the problem with the first element. Everything is sorted in a growing or...
[4 replies] Last: See also http://www.cplusplus.com/forum/beginner/278817/ with working ... (by seeplus)
by vboro
Problem with inserting element to empty list?
 
Hi! I've decided to practice linked lists, creating nodes from different kind of data structures, arrays and stuff. My current task is creating a linked list f...
[11 replies] Last: It ran down perfectly, except one thing - that it left out my first e... (by seeplus)
SDL bad performance
 
Hey! I’m testing out SDL and made the following test project to see the performance. I want to make an array of points randomly on the screen, then for every...
[11 replies] Last: This algorithm may be of interest: a constant time algorithm on GPU ... (by JLBorges)
by vboro
Rotating matrix problem
 
Hi! I got the task where I must make a function in which I must rotate a dynamic, bool matrix and save this rotated form to another dynamic matrix in a void fun...
[3 replies] Last: Ooo thank you very much, I get it now :D (by vboro)
Need to create an Entry.cpp file
 
I need to create a entry.cpp file that will follow the functions listed in the entry.h file listed below. Could anyone help me create one? /** A class o...
[14 replies] Last: When I zip the project and open the project on another machine the bu... (by AbstractionAnon)
Trouble initilizing static variable.
 
I am trying to initialize the variable count, which I declare in the class Count. However, I have tried doing it in multiple places in multiple ways and it does...
[4 replies] Last: Thank you for your help. (by BroBuilder)
by siid14
Linker issue ?
 
I'm doing the following problem : Add on to your Rectangle class from last time: 1)Create a new class TestRect which is a friend class of Rectangle. Insi...
[16 replies] Last: Hello siid14, This is what I came up with using your code with a fwe ... (by Handy Andy)
Min and max number
 
how to display min and max number that inserted by user without using array ? My coding wont display min number. #include <iostream> using namespace st...
[2 replies] Last: PLEASE learn to use code tags, they make reading and commenting on so... (by deleted account xyzzy)
Bubble sort function for last names, in alphabetical order
 
For this project I am struggling to create my function that sorts a list of full names by last names. I know that I will need to use another bubble sort as I ha...
[5 replies] Last: What's with all the .at() ? As the loops are from 0 to < .size(), then... (by seeplus)
June 2021 Pages: 123... 9
  Archived months: [may2021] [jul2021]

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