
please wait
by CSharp User
forward_list.erase_after seems to return an iterator to the erased element?
|
I am learning C++11 on my own using C++ Primer. I'm supposed to write a program using a forward_list<int>. The program should iterate through the forward_list, ... |
Apr 22, 2019 at 5:40pm
[7 replies] Last: No problem, and thank you for showing me the before_begin method w... (by Peter87)
|
by ICantC
std::forward_list erasing
|
I'm used to working with vectors but I'm trying other data structures for fun, below I am trying to remove an item in a forward list, it doesn't have erase, onl... |
Apr 22, 2019 at 5:22pm
[6 replies] Last: I just learned about before_begin() which allows us to simplify the ... (by Peter87)
|
by calioranged
Passing Member Function as Parameter to Another Member Function
|
I want to be able to pass a function as a parameter to another function within a class. In the example below, I want to pass 'Function_2' or 'Function_3' into... |
Apr 22, 2019 at 4:35pm
[2 replies] Last: Thanks helios that's great! (by calioranged)
|
by JayGln
Best programming practices
|
Thank you first for reading my post. I have my final data structure and algorithms project coming up and I really want to do a great job and have this as someth... |
Apr 22, 2019 at 4:33pm
[4 replies] Last: These are great suggestions thank you. I do know I am procrastinating,... (by JayGln)
|
by stoneJax
strlen
|
I am trying to write a member function that returns the length of a dynamically allocated c-string. I have some code up but it is not correct and I get a warnin... |
Apr 22, 2019 at 3:33pm
[3 replies] Last: That was it. Thank you so much! (by stoneJax)
|
by Abdulahad
Assignment
|
Write your question here. Create a class called student. This class contains data members for name, roll no, and CGPA of a student. Provide a no-argument ... |
Apr 22, 2019 at 2:45pm
[1 reply] : #include <iostream> #include <cctype> #include <limits> int main() {... (by deleted account xyzzy)
|
Implementing polymorphically |
We want to allow our pets to communicate, so let's add a public member function to the Pet class called speak(). This should be implemented polymorphically s... |
Apr 22, 2019 at 1:18pm
[2 replies] Last: Dynamic polymorphism is done in C++ through inheritance and virtual ... (by Ganado)
|
by doodoohead01
Trying to convert float to int with type casting operator
|
Hi, I'm going through the tutorial and I'm on operators. When i enter the code demonstrating the explicit type casting operator and try to print it to the scree... |
Apr 22, 2019 at 8:01am
[3 replies] Last: Okay, thanks! I didn't think about that i should've remembered that th... (by doodoohead01)
|
by stoneJax
Compare Strings
|
I have an overloaded < function that is to compare if two c_string objects are equal or not. I get an error saying no acceptable conversion. Can someone point m... |
Apr 22, 2019 at 7:56am
[8 replies] Last: Your'e right it works. I had one line before that, s2 = '!';, to test... (by stoneJax)
|
by Detslibli
Population estimator, for loop not adding to variable and file is empty
|
For a class assignmet I have to make a population estimator. Here are the specifics: In a population, the birth rate is the percentage increase of the popula... |
Apr 22, 2019 at 5:29am
[2 replies] Last: Yes, this helped me, I found out that I had File instead of file insid... (by Detslibli)
|
by daisy3713
Trouble writing files
|
I can get it to build but it wont run. what am i missing. Put the code you need help with here. //Specification: Append and display records in a addres... |
Apr 22, 2019 at 2:54am
[1 reply] : You're missing and ending code tag! I laugh at my own puns. Anyway, i... (by zapshe)
|
by Myro
Adding emp.totpay together
|
So I'm trying to finish this code up I have one function to complete and that is to add up all the employee.totpay together to return a value, that is then disp... |
Apr 21, 2019 at 11:46pm
[3 replies] Last: got it double Payroll(incomeInfo employee , int NUM_EMPS) { doubl... (by Myro)
|
by stoneJax
Constructor
|
I am starting a new project on classes with dynamic memory and I am trying to make sure that I correctly understand the set up of the constructor. The instru... |
Apr 21, 2019 at 10:03pm
[5 replies] Last: stoneJax wrote: I am not sure of the differences between, or how... (by anup30)
|
by lost110
Operator overloading question
|
Hye so this is a code which I found on the internet.We have to add, subtract multiply rational numbers but with operator overloading. I am not getting what he ... |
Apr 21, 2019 at 9:22pm
[7 replies] Last: Style choice with practical benefit. The public members are introduce... (by keskiverto)
|
Struggling with c-strings and arrays |
The function is supposed to take an output file from the command line input. The function is supposed to output and array of strings one character at a time ver... |
Apr 21, 2019 at 8:56pm
[2 replies] Last: The function "verticalWords" at the bottom doesn't have the same param... (by zapshe)
|
by gjur99
Structures with arrays help!
|
hello! i wrote this code, but i am having some issue with fiding the higiest value stored in p .points_scored corresponding with the player who scored it. but I... |
Apr 21, 2019 at 7:11pm
[4 replies] Last: //find the player with the highest score Is the function meant to... (by Repeater)
|
by cloudsdale
Sharing objects between functions
|
Sharing objects between functions Hello. I made myself a class for storing textures and loading them from files. It's quite a simple class. Internally it ... |
Apr 21, 2019 at 6:58pm
[7 replies] Last: Good luck. Hope you find what you're looking for. (by Repeater)
|
by Harry792
D&D initiative tracker program
|
I been trying to make a program for my charter and I got it all down so I can just type in afew words to look up states or spells but now I wanted to add a comb... |
Apr 21, 2019 at 4:58pm
[3 replies] Last: yes, I get it. I would store all the players in a vector. roll/ co... (by jonnin)
|
by redfury
Problem in making operator overloading function a friend of class
|
I am trying to create a program which will have two classes of rational and complex numbers. I made two global functions for their addition and then made those ... |
Apr 21, 2019 at 4:00pm
[3 replies] Last: When confronted by a list of errors one line of attack to fixing them ... (by deleted account xyzzy)
|
by PistolPete10
need help with a input function
|
I need help, I have the whole program written I just need a function where it asks the user to pick 3 of the 5 cars and compares them, like what I have. It comp... |
Apr 21, 2019 at 3:54pm
[5 replies] Last: Heh, I really do need coffee and lots of it. The comment at line 40 I ... (by deleted account xyzzy)
|