General C++ Programming (Page 18)

Program I'm writing
Can someone look through this and tell me why amount isn't displaying anything in the "Total" file? ...
[2 replies] Last: I should clarify, it does show something, but only "Total money spent"... (by ComputerG33k)
by Kalcor
Difference between struct* and struct*&
Having a linked list for example in the form of a struct. Why do we send the head of the linked list...
[3 replies] Last: in a lot of code, * is sufficient. You only need the & if you plan to... (by jonnin)
Checking tic tac toe winner on a board NxN (1D array)
So, previously I made a tic tac toe game with a normal 3x3 board. My teacher assigned us to make a t...
[3 replies] Last: access of a 1-d array as if 2-d is simply array[desired_row*numcols+d... (by jonnin)
Divisibility by 3
I'm trying to write a code for an integer n a) n is less than 500 b) n is positive c) n is d...
[5 replies] Last: yeah could work but that will be another code to add individual values... (by briankiprono)
Testing for a character in a string
I just had one quick question, is it possible to test for one character in a string? Example of what...
[1 reply] : (by cire)
C++ LOOPING - Lost with homework
Create a loop which reads a customer number, customer name, and customer balance from the keyboard a...
[2 replies] Last: it is the first class in C++ programming - everything else has been in... (by brown1z1975)
Tried but nothing coming up. Can you help me with this?
55. After following statements have executed, what will be appear on the output window int i=0, a=...
[1 reply] : What did you try? int i=0, a=0; // i==0 and a==0, are they not? wh... (by keskiverto)
by Thelps
Error on last value of last box of a vector<int>.
Difficult for me to explain this one. Have a function that parses a text file. Every time the funct...
[6 replies] Last: Ganado got the right lead... :) Turned out I had specified the int th... (by Thelps)
While working only when std::cout is used
I have encountered an unusual problem: I have a while(1) loop that will break after a few iterations...
[8 replies] Last: #include <iostream> #include <string> using namespace std; //=======... (by lastchance)
c++ efficiency subject
Hi there! This is a subject related to copy constructors and efficiency in C++. The following co...
[14 replies] Last: > do you suggest we should rely on this and simply store the return va... (by JLBorges)
by Cp9
do-while condition problem
Hello, I have a problem with the do-while loop. When user press incorrect character I would program ...
[3 replies] Last: The value of showType doesn't change. Exactly. That is the problem. ... (by keskiverto)
Structured binding to tuple
Just got into some C++17. Anyone know a good way to make a struct into a tuple? Best I got ATM is th...
[17 replies] Last: magic_get looks pretty neat! It also offers recursive member iteration... (by elohssa)
Memory Game
Welcome to the memory game! Look away from the board and have a helper enter r to randomi...
[1 reply] : @random9 Why don't you show us the code you have and the way you're t... (by whitenite1)
get paid to solve this.
Give an initial list of candidate classes and responsibilities. Give an initial set of CRC cards....
[1 reply] : Putting aside not doing your homework for you, you've left out the act... (by Repeater)
Help with classes.
I need help with assignment, this is what my assignment reads: "Define a class called Class with ...
[1 reply] : First of all, there is no need for the typedef in line 24. In C++ you... (by doug4)
While loop/ rand()
Use a while loop to write a program that calculates the sum of N integers entered by the user. N is ...
[5 replies] Last: Why not just post the code you have so far? It is easier for us to co... (by doug4)
Read binary file passed in from command line
I need to pass a file from the command line, read the contents, output to console, and create an o...
[1 reply] : There's a fairly good explanation here (also see the next page). They... (by kbw)
Deserialize binary tree
Hello. I'm working on a program that deserializes a binary tree from file Besides what it is doing,m...
[6 replies] Last: Thank you very much! (by MirelPasa)
by KB93
Negative integers in a List
If you wished to write a function to determine how many negative integers are in a list, without usi...
[1 reply] : std::count_if() . (by mbozzi)
by KB93
Produce a List of Integers Without Loops or Recursion
Without using any loops or recursion, how would I write a function getLengths that, given a vector o...
[1 reply] : #include <iostream> #include <list> #include <vector> #include <algor... (by JLBorges)
Pages: 1... 1617181920... 23
  Archived months: [jan2018]

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