Beginners - February 2018 (Page 22)

by geo28t
Pass by Reference and Value
 
I do not fully understand why the output of this code is what it is. WHat changes once "foo" is implemented? int foo(int i, int & j) { int result; i ...
[1 reply] : Your foo() starts: int foo(int i, int & j) { int result; i = 2 * ... (by keskiverto)
Compound Interest, varying rates
 
I am totally confused on how to write the formula for a compound interest. I thought that it would be A = P (1+r/n)^n+t, but the rates vary between each perform...
[no replies]
Error, Please help
 
Any one mind helping me? i'm new to this site. I'm just trying to finish this program. The only thing that i haven't gotten to work is the prompt for the record...
[1 reply] : I added two lines to the write function to fix the prompt. I don't kn... (by rjphares)
Why does getline skip first ENTER?
 
For some reason, when running this, the first time getline() is called, i have to hit enter twice before execution continues. After the first time, everything w...
[5 replies] Last: So i'm unsure whether to just bump this or create a new topic.. At thi... (by cPlusN00b)
Help with array code
 
Hey, I am new to this site and am seeking help with fixing this code. It's supposed to take user input to replace specific parts of an array of size 10. Putting...
[2 replies] Last: Thank you for the advice. I modified lines 18 and 25 to have the actua... (by SonnyTedesco)
Program Crash
 
When I attempt to compile my program, my program crashes. I'm pretty sure the shuffle_array function causes it to crash. When I delete the function and run the ...
[4 replies] Last: I'm an idiot. Thank you very much fifi885. Realized I accidentally put... (by olivertwist)
Ifstream using Class private variables
 
So I am trying to read in a file using private class variables. There might be another way to do this, but this is what I could think of. Note, its my first pro...
[1 reply] : also tried istringstream ss(str); ss >> employee.get_name(str) >> e... (by tidematic)
Vector size is completely wrong...
 
I'm writing a snake game using sfml. I'm storing the body in a vector, and I change each of the vectors in a loop that looks like so: void Snake::MoveBody() {...
[8 replies] Last: @TheIdeasMan Ok, cool, that will make my code look alot nicer! Thanks! (by Optimistic Peach)
C++ Menu Choice Error
 
I am attempting to write a program that is capable of outputting a menu that the user can select a choice from then calculate time of bird's flight. However, I ...
[3 replies] Last: Thank you! I appreciate the feedback :) (by juliefrmn)
by mtiger
Array of Arrays Help
 
Hi Guys, I'm new here, although have a little programming experience. Need a little help with the following array situation. I have 16 arrays from patternA ...
[17 replies] Last: Success!!! My original struct was the solution, however I had missed... (by mtiger)
Critique and Optimize my coding?
 
For this project, we were supposed to set up a calculator program, where you could enter a number and either use addition, subtraction, multiplication, division...
[3 replies] Last: Thank you guys for the replies! I agree with you jonnin, I'd much pref... (by Elarionus)
Very simple beginner problem on finding area of circle
 
Hello, I am new to the forums and C++ in general which I started learning in January. I am on a problem that seems extremely simple to me, but I cannot understa...
[4 replies] Last: ... (by Duthomhas)
number doesn't go through switch statment
 
Could someone tell me why when I run the program it doesn't go through the swtich statement? #include <iostream> using namespace int main() { int...
[2 replies] Last: Got it, great thank you. (by ddaniel10)
by soul0h
Problem solving !
 
Hey guys , so i have this homework for tomorrow to find the sum of numeric series of: "1/(2*3) + 4/(5*6) + 7/(8*9)............3*n-2 / (3n-1)*(3*n)" I did this b...
[2 replies] Last: First, please use code tags when posting code. See http://www.cplusplu... (by keskiverto)
Random number problem
 
Hello, I have been solving this problem and i seem to be stuck. The idea is to get the computer to guess the user selected number and computer should guess it c...
[1 reply] : The most efficient way to guess a number within a range is to divide t... (by Ganado)
How to declare prototype of Template functions
 
Is this the proper way to declare a function prototype with template class? template<class T> SMatrix<T> stressen_mat_mul(const SMatrix<T>& , const S...
[no replies]
by atl13
Need help with programming assignment!!
 
Hey guys, i am having trouble finishing my program. Here's the program. I am getting an error saying my 'fin' is not declared. I also need to include a loop to ...
[6 replies] Last: Have a look here, seems the same problem: http://www.cplusplus.com/fo... (by Thomas1965)
Debug
 
can someone please help me debug this? // User enters price // program computes tax rate // 5% at $10 and under, otherwise 7% #include<iostream.h> #inclu...
[3 replies] Last: The double price variable declared inside function askPrice is not the... (by dhayden)
Extra Blank line on output
 
Hey everyone. For starters, this is my first time coding in C++ and I have litte experience in code generally. I made a little code that reads through multiple ...
[6 replies] Last: about your original code, ¿why do you do while (part[i-1]) ? in the ... (by ne555)
cygwin_exception::open_stackdumpfile: Dumping stack trace to array_c__.exe.stackdump
 
Hi, i got this error 3 array_c__ 9952 cygwin_exception::open_stackdumpfile: Dumping stack trace to array_c__.exe.stackdump when I run the following code...
[8 replies] Last: You shouldn't put functions in header files unless they are inline. O... (by dhayden)
February 2018 Pages: 1... 2021222324... 28
  Archived months: [jan2018] [mar2018]

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