
please wait
Copy Assignment Operators? |
I’m still unsure about return statements versus return values. So for a copy assignment operator, what would he return statement be? And what would the return... |
May 21, 2019 at 1:02pm
[4 replies] Last: @keskiverto Absolutely correct on all counts, my error. Thanks for c... (by SimpleCoder)
|
by SimpleCoder
Can't reserve a <vector> of a class object (complier error)
|
I have two classes WxMonth and WxWatch , the first containing a <vector> of the second. In the header file, I can declare: std::vector<WxWatch> mMonthWx; ... |
May 21, 2019 at 12:59pm
[3 replies] Last: @dutch, @Niccolo Thank you, both. Solved. That was the problem. (by SimpleCoder)
|
by wasifali833
Assignment help
|
I have got homework. but I am busy with my exams. anyone help me in doing this assignment. Thanks in advance. 1) Build an application which populates (Build... |
May 21, 2019 at 12:24pm
[2 replies] Last: Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
|
by akash16
Throw exception from Destructor
|
Is it a good idea to throw an exception from a Destructor? What happened if exception throws from a Destructor? |
May 21, 2019 at 12:20pm
[3 replies] Last: C.36 is a more specific guideline: https://isocpp.github.io/CppCoreGui... (by Cubbi)
|
by tabaluga
Tricky interview question
|
I was asked at interview : "What is the purpose of such function ?" template<typename T> bool foo(const T& t) { return t == t; } And I don't ha... |
May 21, 2019 at 6:07am
[17 replies] Last: To avoid confusion, this behavior occurs under the GNU implementation ... (by mbozzi)
|
by Cambalinho
Windows 10\Windows Defender: Code blocks
|
i'm using Windows 10 with Code Blocks... if i disable the Windows Defender, the compiler can create the exe... else i will get these error: "ld.exe||cannot op... |
May 20, 2019 at 8:26pm
[4 replies] Last: i added the exe file and works now.... but if i do the same on another... (by Cambalinho)
|
by K0rupt3d
OOP mess.
|
Im just starting to get into OOP and i'm struggling with this program. I need to Create link list with inheritance. Once list is created calling a push from t... |
May 20, 2019 at 4:14pm
[5 replies] Last: Here are class definitions that I used to implement this. I've also in... (by dhayden)
|
by Ashh
c++ won't read my else if statement for calculation
|
Hi, I'm having a problem at the else if statement. If I enter PT3 for the category, P for package and when I choose 'D' in if for the code of time, the calculat... |
May 20, 2019 at 3:46pm
[2 replies] Last: what language is that from? It looks a little like how excel does con... (by jonnin)
|
by aceadams
assign value of boolean equal to validity of statement
|
#include <iostream> #include <fstream> #include <algorithm> using namespace std; int main () { ifstream fin ("measurement.in"); ofstream fout ("measure... |
May 20, 2019 at 3:05pm
[2 replies] Last: Is this correct already? YES. you can also treat boolean expressio... (by jonnin)
|
Doubly Circular Linked List |
I need help implementing a Push function for a Doubly Circular Linked List. This is what I have so far: //inserts t at the front template <typename T> void L... |
May 20, 2019 at 2:53pm
[7 replies] Last: @ keskiverto That breaks it. (by Duthomhas)
|
Doubly Linked List |
How can I write a code for this Push function: template < typename T > List<T>::Push(const T& |
May 20, 2019 at 5:51am
[1 reply] : Are you still in the circular list of yours: http://www.cplusplus.com/... (by keskiverto)
|
by goodbyeworld
Trouble passing instances of another class to another class
|
Hello. I am still new to object-oriented programming in C++ and I'm having difficulty in dealing with classes. We are tasked to create a multiplayer game in sch... |
May 18, 2019 at 12:42pm
[3 replies] Last: Nevermind, I have already fixed the error. Oh and thank you @whiteni... (by goodbyeworld)
|
by akash16
Throw exception in Constructor
|
Is it a good idea to throw an exception from a constructor? What happened if exception throws from a constructor? |
May 18, 2019 at 10:49am
[4 replies] Last: Thanks JLBorges and Duthomhas. You guys are really great. :) (by akash16)
|
by ciprian98
c++ exercise for school
|
Hello guys, so I'm supposed to create a program which has to print the highest offer of a group of donators. The group of donators's information has to be manag... |
May 17, 2019 at 6:12pm
[3 replies] Last: Unfortunately, the point in CS 101 classes is often to learn how to tr... (by Duthomhas)
|
critical hit system, C++ |
I am trying to create a simple hit and critical hit system. from using a random number from 1-10 that then has a 20% chance for the user to get a critical hit a... |
May 17, 2019 at 6:00pm
[6 replies] Last: do { if (counter == 0)// if the counter variable is 0 it is the pl... (by AbstractionAnon)
|
by Dantecross12
Need help sorting matix
|
Hi I'm trying to write a program to rearrange a two different matrices such that the numbers below each number in the diagonal are smaller than the diagonal num... |
May 17, 2019 at 8:24am
[8 replies] Last: You aren't quite looping correctly. The structure should be: for each... (by lastchance)
|
by ARom012
Date file addresses on other computers
|
Hello. I've been working on an application that reads and writes to a data file. I have everything working fine except that when other computers try to use it, ... |
May 16, 2019 at 9:09pm
[8 replies] Last: No it'll be in the current working directory. I wonder where the wor... (by zapshe)
|
by cdiaz851
Can't get calculations right
|
I'm writing code to make a basic Rational class but i keep hitting a dead end. My r1.add(r2) keeps resulting in -426974861 / 44086 (should be 5/2) ... |
May 16, 2019 at 8:32pm
[6 replies] Last: If you can't change the header, you could just have all constructors c... (by dhayden)
|
by hixtus
Incorrect/Partial Output - Stuck please Help!
|
Hello! Please help. I'm stuck. Thank you so much :) I was tasked to create a program that would output the shortest paths to all other nodes . So for example... |
May 16, 2019 at 5:28pm
[6 replies] Last: So... I’m doing a really terrible job of explaining this stuff. Als... (by Duthomhas)
|
by gerardo23
Program is in infinite loop for some reason.
|
#include <iostream> using namespace std; int main() { int question; int play; cout<<"Hello, and welcome to my MAGIC 8 BALL! \nWould ... |
May 16, 2019 at 1:34pm
[3 replies] Last: PLEASE learn to use code tags, it makes reading and commenting on your... (by deleted account xyzzy)
|