Beginners - April 2017 (Page 4)

What am I doing wrong? Total calories burned calculation
 
This is my third time ever, writing code... I don't know what I'm doing wrong, but the total calories comes out to zero no matter what values I put in when runn...
[2 replies] Last: Thank you SO much Joe!!! Life-saver. (by lisagimros)
How do you adjust the setw of these arrays?
 
Right now the outfile looks like this: YEARLY MONTHLY RAINFALL Month Rainfall in inches January ///////3.8 February ///////5.2 March///// 4.7 April/////6.3 Ma...
[1 reply] : lines 20-21 of this post could give you some ideas: http://www.cpluspl... (by gunnerfunner)
Help about strings and vectors exercises
 
Hello everyone , I need a little help about string and vectors exercises.. I have few tasks. 1. Write a function or functions that allows the user to choo...
[2 replies] Last: store them in 2 arrays or vectors since you have this choice ( a lot... (by gunnerfunner)
Help with functions & rand() please?
 
Can someone help me with this problem? It's a rock, paper, scissors game with the computer and the user. I'm having issues with the random number generator and ...
[2 replies] Last: It doesn't. But I left it empty for the sake of this post, because whe... (by nicoleb)
numbers to words converter problems
 
Am trying to make a program that convert numbers in money format like 12.45 in words for example twelve dollars and 45 cents (cents do not need to be converted)...
[2 replies] Last: got the code tags in. (by JulianV304)
Help with modified binary search?
 
Hey guys i need some help with the last part of my assignment. I am currently working on the rest so i cant post up my code, but i know how to do the beginning ...
[no replies]
header files
 
how many header files is too many? Is using 4 for a big project too many or not?
[1 reply] : You can use as many header files as you want, the compiled program wil... (by nuderobmonkey)
Help with adjusting score after iteration
 
I need help with this code, is there a way I can make it so after the do while loop runs once, and when it does again, it uses the score 15 again instead of the...
[1 reply] : Make your 'Scor'e variable static, then it will initialized only by th... (by nuderobmonkey)
Need help with a program about normalized vectors
 
A vector of points on the plane is normalized if all the following three conditions hold: Property 1: The vector contains at least two different elements. Prop...
[14 replies] Last: No progress at all yet. I will look the code very carefully during th... (by Oriol Serrabassa)
How can I include templates in a program divided into multiple files?
 
Hello everyone. I made a program that gets a series of integers and stores them in an object of the vector class, then I call a function to sort them and then a...
[3 replies] Last: @gunnerfunner Thanks. This solved my problem. (by ufrnkiddo)
Prime number code
 
What's wrong with this code? I learned it at school. It doesn't work for some numbers, including 7,11 and 121. But for the rest it does. #include<iostre...
[1 reply] : Always use braces with if, else, while etc. Here is your code, indent... (by dhayden)
How to properly read data from textfile into an array of objects?
 
Just as the title states. I don't know where I am going wrong. I thought my thought process and code would work but it doesn't. I used the debugger and I checke...
[10 replies] Last: Hello MisterTams, At first look everything looks like it should work.... (by Handy Andy)
by thmm
Why this strange behaviour ?
 
Write your question here. Why am I allowed to pass nullptr to a function that expects a string, but not allowed to compare the string against a nullptr ? ...
[3 replies] Last: Thanks, I understand now. (by thmm)
C++
 
Write C++ program to create five object of book, get information of book using getdata() function including name, price, publication and author. Then Write se...
[5 replies] Last: You should look up the linear search algorithm. This involves keep... (by mbozzi)
by elieh
best way to get user input and search a .csv for it
 
Hello I have a .csv file about 3 columns and more than 2000 rows (and growing). I need to write a program to get input from user and search the .csv file for t...
[8 replies] Last: I updated my compiler from MinGW to TDM-GCC-32 and that fixed the erro... (by elieh)
pig dice game
 
lHello, my question is that I can not seem to locate where my error is. The problem is that although the code runs it doesn't run completely, the game stops ju...
[2 replies] Last: oh wow, I can't believe I didn't see that. Thanks, much appreciated. (by stevea88)
Please help with strcmp!
 
Hello everyone, i was asked to find corresponding decoded letter from the lookup table and compare it with users input. I was able to perform string comparin...
[3 replies] Last: I see you have decided to take the advice I gave and use String's. Yo... (by closed account 48T7M4Gy)
by Ma92
Random_values_checking
 
Please help: tnis code has a logical error . I am using rand function to generate random values from 1 to 5, funtion random generate random values and than thi...
[1 reply] : Hey. Please edit your post and put your code in code tags - http://www... (by TarikNeaj)
by Ma92
srand funtion
 
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; int random () { int rand_num; srand(time(0)); rand_num=rand()%6; return rand...
[2 replies] Last: Thanks it works (by Ma92)
Strange Problem
 
Hi ! I work on a code and sometimes crahs , sometimes work , and I don't know why. I warn you that I have a very strange and messy style . It's only work for "E...
[4 replies] Last: I used argcs to count some old lines that I delete later . I resolve t... (by El Toro)
April 2017 Pages: 123456... 34
  Archived months: [mar2017] [may2017]

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