General C++ Programming (Page 3)

Bug with replacing elements in 2D Vector
 
Hi! I have a 2D Vector defined as vector void initGridFromInput(vector <vector <int> > & sud...
[2 replies] Last: line is a char . The '7' is a character that looks like, well, s... (by keskiverto)
switch statement
 
Hi i'm more confused by how the teacher worded this assignment than the fundamentals of C++ but mayb...
[1 reply] : I think the new switch statement goes between cin >> grade; and swi... (by dhayden)
heapify algorithm using array indexes
 
I need to heapify an array and I'm using an example from my book which shows the heapify process fro...
[no replies]
Mean and Variance
 
I have to write a program in which it is to compute the mean and standard deviation from a set of 1...
[2 replies] Last: Start by blocking out what you need to do: generate a set of 10 rand... (by PCrumley48)
by Maco10
error: passing ‘const …'’ as ‘this’ argument of ‘…’ discards qualifiers
 
Hello, I am making a C++ program. I have finished. but the compiler returns me this error: decharge....
[2 replies] Last: I can fix it! Your assistance was very useful. I am going to follow yo... (by Maco10)
Exceptions in a function
 
Hi, So i have this program that is basically an ATM program that prompts the user to either: deposit...
[3 replies] Last: catch-statements should terminate a try-block inside a function or me... (by Computergeek01)
Future of C++ Modules
 
Hi, I've been reading into the future of C++ modules, and I don't think they can come soon enough. ...
[2 replies] Last: Modules can certainly be emulated with design patterns, but that doesn... (by wcassella)
by Myna
c++ program that count the occurrence of character in a text file and produce a histogram of the character count.
 
Here is what i have so far: #include<fstream> #include<iostream> #include<string> using n...
[1 reply] : 1. Why do you need this second while -loop? Its body will never be ex... (by tcs)
Knight Tour Loops Problem
 
I'm trying to solve the problem for knight tour which each square only allow visited 1 time. #inc...
[1 reply] : 1. Your code is heavily unreadable. Please use [code ]/*Your Code Here... (by tcs)
How does OPL2 synthesis work?
 
I'm trying to find out how to synthesize the Adlib/OPL2 chip fully in software myself in C, but I ca...
[1 reply] : I'm assuming you were at least able to find an OPL2 doc that covers th... (by Disch)
Passing an array of pointers from a function to main()
 
I have a a group of text files that are used as input into a program. Another very similar program ...
[2 replies] Last: 1. The program above compiles well. 2. Line 10, 12: You've defined ... (by tcs)
by arj511
Simple Assembly Language problem
 
Write a C++ program which asks for 5 numbers to be entered by the user. The program stores the num...
[3 replies] Last: std::sort http://www.cplusplus.com/reference/algorithm/sort/ http://... (by LB)
Who wants to be a millionaire?!
 
I am making a program that is a game similar to who wants to be a millionaire. It has to read the th...
[no replies]
WRITING A HARD PROGRAM!!
 
Ok
[2 replies] Last: File input: http://www.learncpp.com/cpp-tutorial/136-basic-file-io/ ... (by anup30)
Function pointer syntax.
 
Hello, I have a piece of code that sorts data based on some metric. The some metric is somethin...
[4 replies] Last: > It's going to take me some time to understand the syntax of placehol... (by JLBorges)
How to copy a .txt file?
 
...
[4 replies] Last: Would there be a way of doing it with the way I did it above? If I do ... (by jdougherty)
A Simple Problem
 
Create a user-defined program that will compute the price per square inch of a cake using an “over...
[4 replies] Last: The instructions call for using overloading. That means same function... (by PCrumley48)
by morv
Copy constructor and destructor in c++
 
Class Car{ Private: string* _ID; bool _isFaulty; int _location; int _timer; ...
[3 replies] Last: You'll need to loop too. Also, you can't just delete _roadPlan, it's a... (by tipaye)
Passing an object constructor to push_back
 
Hi, I'm writing some code that reads in a number of lines and builds objects based on them, that ...
[5 replies] Last: That's the odd thing, there was really absolutely nothing going on exc... (by Gaminic)
Unresolved External symbol
 
I need help with this error message please: Error 1 error LNK2019: unresolved external symbol "pu...
[3 replies] Last: You code has 2 constructors: This one - Declaration: Book(char t ,... (by tipaye)
Pages: 12345... 63
  Archived months: [sep2014]

Cannot post in this page. To post a new message, go to the first page.