Beginners - May 2018 (Page 6)

Newtone Algorithm problem
 
Hello everyone! I'm getting -nan(ind) as a result i have tried this code with other functions and it worked pretty well as a result i should get something like...
[2 replies] Last: Thanks a lot ! Works well (by keepmypl)
by pepepe
sum map problem
 
How do I let the program calculate the sum of value and retrieve the match person. If both of the individuals reach sum of total value, they are matched. Like i...
[19 replies] Last: ty for the patience. i found the error and actually got the intended o... (by pepepe)
clear screen
 
does system("cls") have the same function of clearing the screen as the clrscr(); but each use a different header file?
[1 reply] : system("cls") runs the cls command. Note that cls does not exist on ... (by Peter87)
Using maps and binary search tree
 
Whats the would be a good way to fill a binary search tree with maps? I am reading information from multiple files that has information stored by date and time...
[no replies]
How to decide when to end my while loop when it runs 1 too long
 
My code is supposed to read a text doc and organize the string chunks, then run an error checker and print out everything in a specific way. Currently all works...
[3 replies] Last: Also, I prefer to indent 4 but my school has a testbed software that ... (by Ganado)
ALIQUOT SUM problem
 
I am calculating if the number is perfect, abundant or deficient. Program works but if i enter bigger number it doesnt. Program should work with number between ...
[5 replies] Last: Hello pokolas, After 4 1/2+ hours of letting your program I finally g... (by Handy Andy)
Program to calculate area and circumference not outputting values
 
I wrote this program for my course, but when I run it the output within the OutputData() function just spits out zero. What makes it output zero when run? ...
[2 replies] Last: There's a number of errors in variables names. Try avoiding global va... (by Enoizat)
An anonymous error is found in my code line 27
 
Please tell me why output line 27 in code print extra number like hexadecimal number with actual result in the index of array #include<iostream> using n...
[2 replies] Last: You write i will remove this one and try again. (by aqibhussain)
Cleaner initializer list method?
 
I've got a main class that has about 20 or so member objects and as far as I know, those need to be initialized through the initializer list. That's fine and al...
[3 replies] Last: Put them on separate lines and indent them. (by tpb)
Program issue with decimal
 
I am tasked with creating a code that takes the input cost and tendered amount and calculates the change and breakdown. I have everything working, except the de...
[3 replies] Last: Thank you both, that did it! I will keep in mind all the shortcuts to... (by justStarting)
by yashps
Why can't I declare a vector inside a C++ class ?
 
Why can't I declare a dynamic array (vector) inside a C++ class ? In the following snippet, the static array 's' seems to work fine but vector 't' creates err...
[2 replies] Last: Thanks. I got it now. (by yashps)
by gn4cys
Review & Comments on my Random Walk
 
Hello, I came up with exercise for myself in which i tried to use most of my current C++ knowledge with which i feel comfortable (well, i've understood conce...
[4 replies] Last: Could you explain in a little more detail? I understand that this is ... (by TheIdeasMan)
Program won't output correctly
 
Hi all, I have written code and my task is to print if a flower grows in the sun or shade. I have a .dat file with a list of flowers in it, but I'm to the point...
[6 replies] Last: Update: I have gotten thus far, it prints all the flowers and whether ... (by helpwithcplusplus)
Difference between vector object and c++11 array?
 
It's quite "hard" for me to understand the difference between those two. If I'm correct with the c++11 array we can do: array<int, 3> test = {1, 2, 3};...
[3 replies] Last: Very useful replies, thank you guys, really helped. :) Marked as solve... (by caesarra2)
by kakoda
How to get 2 divided numbers printed on screen?
 
Hi everyone, Im fresh to the programming world and would like to ask a question. I need to make a program that should have 10 declared variables from appr...
[3 replies] Last: Hello kakoda, You are welcome. Anything that you do not understand le... (by Handy Andy)
by jony11
program
 
Write your question here.i want to write a program which input are inteher number from 1 to 1000 and print the verbal equivalent
[1 reply] : https://codereview.stackexchange.com/questions/30525/convert-number-to... (by Thomas1965)
PATHS
 
You are given an N x M size grid where N is the number of rows and M is the number of columns. Your task is to calculate in how many ways you can go from the up...
[1 reply] : Please don't triple-post. Close this down with a green tick and use yo... (by lastchance)
by madeel
compiling error
 
I'm a math student and learning from the book C++ for mathematicians. The book separates interface from implementation. As I follow the book's instructions,...
[1 reply] : The gcd function is a function that you can call from other functions ... (by Peter87)
dynamic_cast fail, but static_cast works
 
I am trying to use dynamic_cast for this, because it includes RTTI...but it won't work with dynamic_cast, it works with static_cast however #include <iostre...
[4 replies] Last: Hi, Why create a base class object then want to cast it to derived? W... (by TheIdeasMan)
by wsme
Simon game function error
 
I was trying to make a simon memory game, when I noticed my code was turning to spaghetti. Trying to clean it up, I added more functions, and broke my code. My ...
[3 replies] Last: Oh geez, thanks guys. Was not finding the error, but these catches wil... (by wsme)
May 2018 Pages: 1... 45678... 19
  Archived months: [apr2018] [jun2018]

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