Beginners - October 2015 (Page 25)

by aflons
How to connect void statements ( Hope I asked this question right)
 
So right now my main concern is trying to have my void statements carry on throughout the menu. As of right now when I hit to view my dafaq statement and nothin...
[4 replies] Last: Thank you guys for the help I am trying my best to grasp this stuff bu... (by aflons)
simple tree game implementation
 
I am trying to come up with an tree implementation capable of creating a tree based on a given pattern. Something like this. http://www.cs.cmu.edu/~adamchik/...
[no replies]
Vector values in an ascending order
 
Hi, I am writing a program that takes all the values in a vector, arranges them from highest to lowest and writes them into a file. The following code freeze...
[4 replies] Last: void write(const std::vector<double>& Numbers) { std::ofstream w... (by DDomjosa)
help with a simple function
 
Function int readHours() reads one or more hours worked by an employee in the week, computes their sum and returns it. The list of hours is terminated by the du...
[6 replies] Last: PS I know you were calling the function three times and maybe you have... (by closed account 48T7M4Gy)
i don't get all the points where is the wrong ?
 
This is the problem : Ariadne wants to find a snail to participate in the World Grand Prix snails. Therefore he asked Pantelis to supply a number of snails aft...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg218019 (by ne555)
by vjaako
Why is this loop infinite?
 
Shouldn't this program stop, and ask me to "Enter number of values you want to sum: " again, after the first run? Without the while loop, the code does what i...
[14 replies] Last: @OP: oic... i thought it was from inside while loop, not from a func... (by chipp)
Segmentation fault
 
when i input 's' i get 20 random values, but when i input 'b' i get segmentation fault Ievadiet cik liels būs masīvs 20 vienības (s) vai 25 vienības (b) ...
[4 replies] Last: @ OP, for us to help you better, avoid to re-edit the initial code wit... (by chicofeo)
by noodel
If statement
 
So I dont know what's wrong with my code. I have to do this task for school: If you are buying more than 5 things, butless than 10 - you get 5% off. If you are...
[2 replies] Last: It helped! (by noodel)
by Sh0es
Explicit Casting for Templated Function
 
I have a project in which I'm including a templated function. The function is supposed to search for and display objects based on a variety of the class' fields...
[11 replies] Last: Even if ... Yawn, mere shadow boxing. (by closed account 48T7M4Gy)
Calling two constructors with one object?
 
Is it possible to instantiate one class object that calls two constructors? I have a one-parameter constructor and a two-parameter constructor. I would like ...
[4 replies] Last: Thank you everyone for your replies. I just realized I DON'T need to c... (by Arslan7041)
Finding the highest value inside a vector
 
Hi, so I have a vector with a few double values and I need to find the highest of them. When I run this, the console freezes: double highest(std::vector<d...
[9 replies] Last: void read(std::vector<double>& A) { std::ifstream fd(Cfd); d... (by DDomjosa)
Very beginner need help with object member
 
I have no idea why my code is not working. i know its probably very simple but I started learning c++ a week ago and cant figure out why. //main.cpp---------...
[17 replies] Last: Glad it worked - maybe it needed a 'Clean' and 'Rebuild' (see menus if... (by closed account 48T7M4Gy)
for a specific characters show me a number
 
in c++ How can i make a program that for a specific characters it will show me a number ? e.x for -*- must show me number 2 and when i cin --- program ends ...
[2 replies] Last: Thank you very much Tarik Neaj !! i will try it if i have any quest i ... (by Antria4)
sum 2 of the number that i insert to the program and must be equal with the number i have in the begin
 
For c++ The program must read a number for the money that i have (this is okay ) after it read a number with quantity of numbers that will read the program (...
[no replies]
VERY NEWWWW programmer. needs help with fof
 
So my teacher mentions about using the for loop, setw(), and setfill() to make a table like the following. However, I do not understand that how to use a setw()...
[2 replies] Last: OMG THESE TWO links are so helpful!!! THANKS KEVIN Q-Q (by tonyz0212)
by st4evr
Program To Test Multiple/Divisible By 7 (1,2)
 
Hello, Beginner C++ student here, first programming class. I am trying to write a program that will check to thee is any number is divisible by seven. By tha...
[20 replies] Last: Oh wow, thank you so very much for that Kevin. I will use this to comp... (by st4evr)
Weird Bug with beginner dougeon crawler challenge
 
Hey guiys I've been learning to programme for a couple of weeks now and ive been working on the beginner challenges and I have a strange bug with the dungeon cr...
[1 reply] : Hi, Please use code tags, you will get more replies because it makes t... (by TheIdeasMan)
by GabeJ
ifstream copied to ofstream where every string of two or more consecutive blanks is replaced by a single blank
 
I'm trying to write a program that takes the input from one text file and outputs a copy to a second file. The only difference is that every string of two or m...
[2 replies] Last: Thank you. It worked. I had to make one more change. It wouldn't compi... (by GabeJ)
by Butch
how to get sum of numbers from 1 to whatever number
 
I'm having trouble with a code I need to produce which requires me to get the sum of numbers from 1 to 5, then 1 to 500, then 1 to 4000, then 1 to 22. And if t...
[8 replies] Last: @pearlyman I don't think that piece of code is going to help anyone, ... (by closed account 48T7M4Gy)
Linux compile issue
 
I've created my code in Microsoft Visual Studio Express 2013 and it compiles and runs fine. I've moved this over to Linux and had compile errors. To fix it, I h...
[2 replies] Last: isLessThanByID() returns true if the ID of this has a greater lexi... (by helios)
October 2015 Pages: 1... 2324252627... 57
  Archived months: [sep2015] [nov2015]

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