General C++ Programming - October 2016 (Page 3)

memoization for fibonacci array
 
Can someone tell me how I could do this in c++. I can't use the same array which I am updating. In other words, if I uncomment the commented line I get an error...
[8 replies] Last: @ne555: got it, I was stupid, it should be i instead of n. It works af... (by funprogrammer)
Constructor and disctructor
 
hello guys i have a question, can i use constructor and then i insert a function for importing data. and it can be work if i use destructor and then i use...
[2 replies] Last: thx you sir. (by mustain5)
by JM0911
Need assistance with sorting my code
 
Hello there. I have put together a program that displays rainfall in each of the twelve months but I am having a hard time sorting the months from most rainf...
[2 replies] Last: Thank you, I implemented the changes. Advice on how to get it to displ... (by JM0911)
Some assistance with directed graphs
 
Hello, I am new to the board. I was wondering if anyone would be generous enough to take a look at my code for a directed graph, more specifically, why I kee...
[5 replies] Last: I see, I wouldn't have guessed a big part of the problem would be in m... (by beerdog)
by mbozzi
h
 
What's the question?
[2 replies] Last: ??? (by orangepeel367)
Could anyone help me with the exam paper?
 
Question 1. Write an appropriate C++ statement (not a whole program) to store the salary of an employee. Initialize it to $75,000. (Assume that the salary is ...
[12 replies] Last: #include <iostream> using namespace std; int main() { char inpu... (by closed account 48T7M4Gy)
C++ Arrays to ARM assembly
 
Hey everyone, I have a question about working with arrays in ARM assembly. Let's say I want to add up the values in the C++ array: int array = {1, 2, 3, 4}...
[2 replies] Last: http://www.coranac.com/tonc/text/asm.htm (by closed account 48T7M4Gy)
Vectors
 
Hi, I just started learning c++ and I was doing fine until we hit vectors and arrays. If anyone could help me through this program and explain I would be really...
[8 replies] Last: http://www.cplusplus.com/doc/tutorial/arrays/ http://www.cplusplus.com... (by closed account 48T7M4Gy)
Listing two arrays
 
My homework is asking me to list two array into two columns, I was able to get the program to list the two arrays into the two columns but I don't know how to m...
[3 replies] Last: There are millions of options, this is just one: cout << setw(10) <<... (by closed account 48T7M4Gy)
Need help with signals project
 
Hey guys, I need some help choosing a project for my undergraduate signals and systems class; especially one that's not utterly time consuming. My professor s...
[4 replies] Last: Do you prefer to do something with circuitry or something with softwar... (by mbozzi)
Can't use namespace
 
Hi everyone, I don't really understand why but although I am using a namespace the compiler tells me the class is ambiguous. Here's the code: #inclu...
[2 replies] Last: What AbstractionAnon is saying, is that by declaring using namespace G... (by Hydranix)
Long integer addition, subtraction, multiplication problems!
 
Earlier today, my program was working alright, even though there were quite a few bugs left. Now, however, nothing seems to be working properly. It's difficult ...
[3 replies] Last: Why are zeros automatically being seen as NULL terminators? Because... (by AbstractionAnon)
by gabars
QuaZip creates new file instead of editing it
 
Hi, I'm writing a Qt application that edits an ods file. I can access content.xml, read it, make the changes that I need on the QDomDocument, but when I save it...
[1 reply] : Well... Found out it's "impossible" right now. (https://sourceforge.ne... (by gabars)
Help completing a code
 
Problem: Write and execute a program to accept two dates in the format dd/mm/yyyy and print the number of days between the two dates if both the dates are valid...
[3 replies] Last: Line 11: You're overlaying the values that were read in at line 8. L... (by AbstractionAnon)
by fluppe
seekg crashes
 
Hi, i would like to know what might cause "seekg" to crash ... ifstream fips(path); if (fips.bad() || !fips.is_open()){ return -1; } ...
[15 replies] Last: Hi again, Using my own code all alone worked fine. On every machine w... (by fluppe)
the default constructor of union cannot be referenced -- it is a deleted function
 
I don't understand where I'm wrong at my code O.o. class Object { private: std::string name; Shape shape;//union public: Object() = d...
[7 replies] Last: If Object is Base class and Rectangle and Circle are Derived classes.... (by SakurasouBusters)
How to include binary search in Sorted Linked List
 
Need a code which will insert a new element in the Sorted Linked List using Binary Search.The code must be only in C++ please
[2 replies] Last: > Sorted Linked List using Binary Search. O( log N ) binary search ... (by JLBorges)
How to get multiple inputs from a single line?
 
int main () { Calculator calc; char c; double x,y; cin >> x; cin.ignore('+'||'-'||'*'||'/')); cin >> y; calc.add(x,y); cout << calc.answer; ...
[6 replies] Last: @JLBorges The OP will always and always try to pick the third one. Tha... (by SakurasouBusters)
Differentiating between invalid format and invalid input
 
My lab assignment is to convert feet and inches to millimeters. The user will input the measurement with the feet first, and inches second. The user must also i...
[1 reply] : Can you show us your efforts and what you have tried? (by SakurasouBusters)
Programing assingment
 
i have a program for a room map game. the game you read the file in from a games.txt and it tells you how many room here are, and which rooms you can enter from...
[1 reply] : Firstly, you don't appear to be having return values for your function... (by SakurasouBusters)
October 2016 Pages: 12345... 23
  Archived months: [sep2016] [nov2016]

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