General C++ Programming - May 2019 (Page 3)

Trying to print elements of an array of derived classes
In main.cpp, when it gets to void printShapesInArray(...) , the print functiion of the correspondin...
[5 replies] Last: > altMenu(shapesArr, arraySize); > Warning C6001 Using uninitialized m... (by ne555)
Copy Assignment Operators?
I’m still unsure about return statements versus return values. So for a copy assignment operator, ...
[4 replies] Last: @keskiverto Absolutely correct on all counts, my error. Thanks for c... (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 h...
[3 replies] Last: @dutch, @Niccolo Thank you, both. Solved. That was the problem. (by SimpleCoder)
Assignment help
I have got homework. but I am busy with my exams. anyone help me in doing this assignment. Thanks i...
[2 replies] Last: Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
Throw exception from Destructor
Is it a good idea to throw an exception from a Destructor? What happened if exception throws from a...
[3 replies] Last: C.36 is a more specific guideline: (by Cubbi)
Tricky interview question
I was asked at interview : "What is the purpose of such function ?" template<typename T> bool ...
[17 replies] Last: To avoid confusion, this behavior occurs under the GNU implementation ... (by mbozzi)
Windows 10\Windows Defender: Code blocks
i'm using Windows 10 with Code Blocks... if i disable the Windows Defender, the compiler can create...
[4 replies] Last: i added the exe file and works now.... but if i do the same on another... (by Cambalinho)
OOP mess.
Im just starting to get into OOP and i'm struggling with this program. I need to Create link list ...
[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 an...
[2 replies] Last: what language is that from? It looks a little like how excel does con... (by jonnin)
assign value of boolean equal to validity of statement
#include <iostream> #include <fstream> #include <algorithm> using namespace std; int main () { ...
[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 ...
[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&
[1 reply] : Are you still in the circular list of yours: (by keskiverto)
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 wit...
[3 replies] Last: Nevermind, I have already fixed the error. Oh and thank you @whiteni... (by goodbyeworld)
Throw exception in Constructor
Is it a good idea to throw an exception from a constructor? What happened if exception throws from ...
[4 replies] Last: Thanks JLBorges and Duthomhas. You guys are really great. :) (by akash16)
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 d...
[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 tha...
[6 replies] Last: do { if (counter == 0)// if the counter variable is 0 it is the pl... (by AbstractionAnon)
Need help sorting matix
Hi I'm trying to write a program to rearrange a two different matrices such that the numbers below e...
[8 replies] Last: You aren't quite looping correctly. The structure should be: for each... (by lastchance)
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 w...
[8 replies] Last: No it'll be in the current working directory. I wonder where the wor... (by zapshe)
Can't get calculations right
I'm writing code to make a basic Rational class but i keep hitting a dead end. My
[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 o...
[6 replies] Last: So... I’m doing a really terrible job of explaining this stuff. Als... (by Duthomhas)
May 2019 Pages: 12345... 7
  Archived months: [apr2019] [jun2019]

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