General C++ Programming - February 2018 (Page 7)

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] : https://stackoverflow.com/questions/3300743/i-want-to-see-if-a-charact... (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)
open cv error
 
i cant figure out what my error is it keeps giving me the error OpenCV Error: Assertion failed ((uns...
[4 replies] Last: if (x < mp.cols) { //... image.at<Vec3b>(Point((mp.cols / 2)+x,... (by ne555)
by a10e29
I suck at typedef naming
 
Hello, I was following the call stack, to figure out where things had gone terribly wrong, when I...
[1 reply] : It sounds like you already understand that type names should be meanin... (by helios)
by recuva
Problem with struct data type
 
Hello, I need to do some make few programs with data structures. Problem is that everytime I try to ...
[5 replies] Last: Hey, I found the problem. There was wrong character in folder's name :... (by recuva)
February 2018 Pages: 1... 56789... 11
  Archived months: [jan2018] [mar2018]

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