Beginners - July 2016 (Page 25)

How to print a random amount of numbers with a random number for each number?
 
I cannot figure out how to make a random number generator that prints out a random amount of numbers between 10 to 15. These numbers also should be random from ...
[1 reply] : First of all, please use proper indentation, like this: int main() {... (by PattuX)
extract every digit for arithmetic calculation
 
I'm trying to display a c++ output with the image link. this was a sample question given before anything was taught. so I was hoping for someone to give me a ...
[2 replies] Last: I'll go pretty much from scratch here. Everything you need for now is... (by PattuX)
Trying to find average.
 
I don't understand what I am doing wrong. I'm trying to find the average of three numbers. When I run the program and I enter score 1 there is a 0 in front alre...
[3 replies] Last: Oh!! okay I see what I was doing wrong. Thanks for the help. (by qwer117)
Function calls not carrying variable values?
 
I know my code is a hell of a TL;DR, but at this point I am desperate. This program is about the extent of C++ experience (and the extent of my ability to unde...
[17 replies] Last: --- Please tell me your file name. temp1.txt =======================... (by AbstractionAnon)
Variable values going crazy between function calls
 
I have a tax calculation program that uses multiple function calls within a main(), one function in particular calling several calculation functions within the ...
[4 replies] Last: First your using too many parameters in your function calls. Look at t... (by jlb)
Getting a decimal place by dividing integer.
 
I'm trying to do a arithmetic calculator when the user input 2 4-digit integer. However, whenever i'm trying to get the division with reminder I'm not able to ...
[2 replies] Last: Hi, cout <<"divfirstNumbers"; //gives me an integer You seem to be... (by Naughty Albatross)
Inverting Strings function not working (1,2)
 
Hello, I am new to C++ and I trying to create a program that inverts a strings lowercase letters to upper and vice-versa. I believe the error is in what I am ...
[24 replies] Last: Que? (by closed account 48T7M4Gy)
Passing variables between multiple functions
 
Hello. I have just started with C++ and as a training excercise wrote this program. It takes some variables, uses them for calculations and then shows the resu...
[10 replies] Last: So the problem is solved now? Good day :) (by Naughty Albatross)
Help with child classes in conditional statement.
 
So for learning purposes and for fun I want to make a simple text based RPG. I barely started and a wall hit me like a truck; searched all over the internet ...
[13 replies] Last: The point of doing myPlayer = new Warrior; or myPlayer = new Assassin... (by closed account 48T7M4Gy)
Reference argument
 
So ive been playing around reference. And there is something I dont understand is how to view its value So i have this code for example int i = 70; Base b(...
[12 replies] Last: Hi, Do you know why is it possible to use a pointer and not a referen... (by closed account 48T7M4Gy)
Issue understanding Modular programming (1,2)
 
So, I recently had a homework assignment where I was supposed to drop the lowest grade and give an average of the top 4 grades, but with twist. Instead of input...
[20 replies] Last: Thanks goes out to everyone for there help. (by DCox2013)
calling dynamic variable of the class
 
hello everyone, I defined a variable (invalid_content) in the content-stote-impl.h function as below: template<class Policy> class ContentStoreImpl : public ...
[2 replies] Last: Thanx u so much for replying. yes I have not defined namespace but if ... (by glitter)
Fibonacci problem
 
I have this assignment due today but i don't quite understand this question. Write a program that outputs Fibonacci numbers. This part I understand I have this...
[8 replies] Last: Don't tell me, @closed account & numerous numbers and extraneous lette... (by closed account 48T7M4Gy)
When do you use reference? vs normal variable?
 
I often have a mistake on declaring a variable by copy. I am used to c# and even though I understand the copy by value and copy by reference thing, I still c...
[3 replies] Last: I see.. great explanation.. Thanks (by skadush)
Help with formula in final step!
 
Hi. I'm looking for some help figuring out the final step in my code. Here are the instructions: --------------- The phone company uses the following rate s...
[16 replies] Last: It might seem too fine a point but in actual fact it is a very importa... (by closed account 48T7M4Gy)
counting Consonants function
 
I am attempting to write a function that counts the number of consonants in a string the user inputs. My output is a question mark with a box around it. I have...
[14 replies] Last: Well done. Commenting out is a very good way to test. Saves a lot of t... (by closed account 48T7M4Gy)
Calling a Function within a function (1,2)
 
I want to call the function addActivity within processData, but it does not work. The problem is most likely activityDistance- I get warnings that tell me it is...
[24 replies] Last: Finally. Glad it helped :) (by Naughty Albatross)
A connect 4 program problem
 
This is a connect 4 program that is not completed. It prints a 9 by 9 board for 2 players to play on. The players type the column number for their piece. The ...
[4 replies] Last: Sorry for these mistakes, this is my first program that I have written... (by ExpectFunction)
by Kaisky
init 2-dim array with unknown length
 
Hello! Just started c++, got some experience from java, arrays were alot easier there. I want to make a Class and initialize a 2 dimensional int array there, b...
[3 replies] Last: Don't. Make accessors: #include <algorithm> class Matrix { public:... (by Duthomhas)
Char array and floats
 
I'm working on a previous thread and have an issue with the char array printing a bunch of weird symbols for line 20. I've been trying different things like pu...
[3 replies] Last: Attention: the comma in CPP is a bit tricky! It is legitim to write ... (by closed account 48bpfSEw)
July 2016 Pages: 1... 2324252627... 30
  Archived months: [jun2016] [aug2016]

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