Beginners - May 2017 (Page 19)

find output of a recursive function by hands
int f(int x, int y) { if(x < 0 || y < 0) return x - y; else return f(x - 1, y) + f(x, y -1); if i want to calculate the output of f(2,1) by hand, ...
May 7, 2017 at 8:28am
[2 replies] Last: oh! thanks!!! that's much clearer to me!! (by karlemange)
by xxvms
Return by refernce
Hi There :) I am reading about returning by reference, and I just wonder how this can be useful. Below there is code a bit modified from book. I have global v...
May 7, 2017 at 8:12am
[11 replies] Last: @ne555 :DDDDD very funny who would think 3000 years ago (or when Greek... (by xxvms)
Loops and Paralel arrays
Hi! I'm meant to be writing a program that will compute the cost of a car and a body modification package plus a sales tax, as of right now devC++ is only givin...
May 7, 2017 at 6:07am
[6 replies] Last: anyways..what are package supposed to be ?? you asked the user to inpu... (by Flaze07)
project
hi I just need a general understanding on this project. like what its asking. Write a program that calculates and displays the total travel expenses of a bu...
May 7, 2017 at 4:51am
[2 replies] Last: To give you an idea... TRAVEL EXPENSES ... (by chicofeo)
Enum with Maps, and Struct
The idea is to have the user choose from a menu of items and store them all in a struct and then print out the order at the end. Everything has worked fine exce...
May 7, 2017 at 4:20am
[17 replies] Last: no worries. I see green ticks all around, glad you got there in the en... (by gunnerfunner)
Undefined reference to function
Hello, on line 116 I'm getting an undefined reference to uninitialized_copy. Could someone explain why? #ifndef VECTOR_HPP #define VECTOR_HPP //#inclu...
May 7, 2017 at 3:48am
[4 replies] Last: a. Remove the declarations altogether and use qualified names std::... (by JLBorges)
Error C2064: term does not evaluate function taking 2 arguments
I've been getting a couple of errors on my program, I was hoping i could get some insight on why this is happening and how to fix it. These are the errors and...
May 7, 2017 at 3:25am
[1 reply] : so you start a new thread to post a link to your previous thread? why ... (by gunnerfunner)
by puchi
Simon says
Hello good night, I'm new to C++ and I'm having some problems. My program is to present the user one more letter per round correct, each move is added a charact...
May 7, 2017 at 2:28am
[no replies]
Binary Search Only Returns First and Last Elements
Hello, I am trying to finish this assignment and cannot seem to figure out what is wrong and multiple web searches and textbook reviews have been of no help. ...
May 7, 2017 at 1:35am
[6 replies] Last: Ok thanks for the help I knew it was probably something small but coul... (by maenielwolf)
search an array
im having trouble setting up main to take in a cin value and sent it to a function to search an array....this is the .h file im having trouble with the raisepay...
May 6, 2017 at 11:57pm
[2 replies] Last: I was doing something like this but couldnt figure out how to use cin ... (by Bluexorcist)
Finding Primes (Basic recursive Question) HELP
In completing the question below I'm not sure how to go about setting up this recursive function. Would it just have to be a series of if states such as is divi...
May 6, 2017 at 9:56pm
[1 reply] : Double post http://www.cplusplus.com/forum/beginner/215084/ (by Handy Andy)
Recursive functions (Basic) Please Help!!
I'm struggling with solving four basic recursive functions such as the ones below. I know the set up for these are fairly similar so any help would be much appr...
May 6, 2017 at 9:55pm
[1 reply] : Hello DanielleL21, Do not double post on the same topic, http://www.... (by Handy Andy)
calculating value of pi using monte carlo method
what is wrong in the code It does not print anything #include<iostream> #include<cmath> #include<cstdlib> using namespace std; double calculate_pi...
May 6, 2017 at 9:45pm
[1 reply] : Hello hkataria11, The program does not print anything because you nev... (by Handy Andy)
I am as lost as human being can possibly be
So, This is my first year ever learning about computers etc and I have been doing pretty well learning C++ and though I am nowhere close to being a mediocre...
May 6, 2017 at 9:24pm
[5 replies] Last: I am not sure if I understand the assignment correctly. Normally you... (by PSinbad)
URGENT HELP (FIRST-YEAR PROGRAMMING)
I don't know how to do this thing. Please copy and paste my code and try to fix it then resend it here fixed. I tried but I cannot do this for 6 days. Please sh...
May 6, 2017 at 7:40pm
[3 replies] Last: May I add that you also don't tell us what the problem is so I'm not g... (by joe864864)
by arbwok
Help with vector implementation
I have to create a graph, and I used vectors as the underlying structure for my map. I have to implement Dijkstra’s Algorithm. I have an idea of what I shou...
May 6, 2017 at 7:21pm
[no replies]
Help with hello world
So I'm trying to learn C++ and I've started watching some tutorials and videos about it and I'm copying their code but I copy it but I get errors they don't and...
May 6, 2017 at 6:41pm
[4 replies] Last: So I tried to rebuild it in eclipse and it didn't work. So I tried it ... (by devdev463)
I am getting weird outputs from my string class when using char const * string
Hello, everyone, I am taking my third program in computer science this time in C++. I have been coding in Python for the last two semesters and as we recently t...
May 6, 2017 at 3:44pm
[5 replies] Last: I actually got it the problem was in updating the size and capacity fr... (by The wizard91)
displaying 2 numbers and check if they are even or odd in C++
Write your question here. hi every one,i know i am new in this site but i have been very much attracted.anyway; i am a first year student taking BScIT;My quest...
May 6, 2017 at 3:21pm
[1 reply] : Untested: void isEven(int x){ bool even = (x % 2 == 0); re... (by Kiryu)
by SKREFI
Error trying to use classes!
This is the main: #include <iostream> #include "Fructe.h" using namespace std; int main() { Fructe banana; return 0; } This is the ...
May 6, 2017 at 2:14pm
[3 replies] Last: Ohh, sorry, I forgot about the error :D https://gyazo.com/6921851c999... (by SKREFI)
May 2017 Pages: 1... 1718192021... 24
  Archived months: [apr2017] [jun2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.