General C++ Programming - April 2016 (Page 16)

by norcal
Help with void function
 
So for this homework assignment I have to ask 3 questions and output whether their correct or not. The part i need help with is writing this code using a void f...
[1 reply] : Here are the bare bones for your project: #include <iostream> #inclu... (by xismn)
by nap 93
classes
 
Any help writing all the parts for this program would be greatly appreciated. I am completely lost as to what needs to be done. I have been trying to complete t...
[no replies]
GPA program
 
hey is there anyone able to help me? I'm to write a program that would use a student id number, name, credit per course and the grade for three courses. I'm to ...
[1 reply] : What exactly are you having problems with? Can you post what code you ... (by edge6768)
Linear Search using Arrays
 
The purpose of this program is to read in string of student answers from a test, and compare those to a string key from an input file. The problem encountered i...
[1 reply] : You haven't initialized the test_scores array. Additionally, why did y... (by edge6768)
pass by address without the &
 
Am studying passing by address: fx foo(&value) uses the argument address(&) to pass to function parameters. In the second example where printArray(array, 6) ...
[4 replies] Last: Yes Thx That was the missing piece. (by technologist)
How to display the beginning balance read from the data file?
 
Okay so everytime i run the code and creates an infinite loop, but within that infinite loop the balance is displaying this huge number: Balance = $-9255963...
[no replies]
by hago77
C++ Tasks
 
Hello, I started learning C++ about a week ago and I got two tasks that I cannot do. I see them really hard, and I was hoping someone would show me how they mus...
[7 replies] Last: What is it doing that you don't expect it to? What isn't it doing tha... (by cire)
Multiple header includes in form application error
 
Hi, I have a form application that has two header includes, such as... #pragma once #include "CommunicationDLL.h" #include "MathDLL.h" However, like thi...
[2 replies] Last: http://stackoverflow.com/questions/625799/resolve-circular-dependencie... (by cire)
Why isn't "BoarHitPoints" reducing the way I think it should?
 
Hey, guys. I'm doing some exercises on classes in between semesters and I'm attempting to create a Combat class and a Boar class, or in a much broader sense, so...
[5 replies] Last: You are setting values in the boar object named object, but your func... (by Scotchdew)
Urgent need of help!
 
Hello! Today I stepped on a brick of lego. While coding, "new" and "delete" both got greyed out. In this part, "new d" is greyed out for some reason that I c...
[5 replies] Last: I was just dumb. It's all fixed now! Thanks to all anyway! (by qvazmir)
use of evaluate as a term
 
I have been reviewing vocabulary lately for c++.I have found most of what I needed but not so much with "evaluate". Is this term reserved for reducing an expres...
[3 replies] Last: Evaluation of an expression includes both (optional) value computat... (by JLBorges)
When to use decltype(auto) versus auto?
 
Hi, When and why is it necessary or convenient to use decltype(auto) on return types or type deduction versus plain auto ? Thanks, Juan P.S.: I h...
[5 replies] Last: auto foo() { int x = 0 ; return (x) ; // fine } decltype(aut... (by JLBorges)
Adding digits of a number than dividing by 9
 
Write your question here. An integer is divisible by 9 if the sum of its digits is divisible by 9. Develop a program to determine whether or not the following...
[10 replies] Last: > Could you help me make my code more modular? Write many small funct... (by JLBorges)
Code to ouput mean, max and min values of an array is returning wrong values
 
This code is supposed to print out mean, max and min value of an array in a structure but it is returning wrong values. Can someone please tell me what I am doi...
[3 replies] Last: See where you get the mean value from inside the struct, like this: a... (by Moschops)
Number of paramaters
 
ERROR CHECK 1: NUMBER OF PARAMETERS: NB: the name of the program counts as the 1st parameter (0th value in the array). If the numbe...
[2 replies] Last: case 4: cout << "P" << endl; This is not correct. If the number of ... (by Thomas1965)
simple ques operator precedence
 
Hi I was reviewing precedence order way back and I couldn't remember/understand why the following expression yielded the result it has: x = 5 + (7 % 2); ...
[3 replies] Last: Thx, I've got the operator precedence down. The trick was reviewing t... (by technologist)
conversion between string and float/double
 
Hi all can any one tell me why when I convert std::string to float or double type the decimal part of value is not exactly as in the string ? for example floa...
[1 reply] : An infinity of values cannot be perfectly represented with floating po... (by Moschops)
MISTAKE! MISPLACED ELSE!***
 
Following is a program about "To check whether a character is a Vowel or a consonant". #include <iostream.h> #include <conio.h> #include <ctype.h> void ma...
[2 replies] Last: Thank you So much DOUG!!! Have a great day! (by stealthkillercod)
Not Converting Correctly
 
It is not converting the convertToYen, convertToEuros, and convertToPesos properly. I'm pretty sure it because it's taking it's answer from convertMulti but I c...
[7 replies] Last: Remember to actually do something with the returned value. (by Moschops)
CORRECT THIS PROGRAM PLEASE
 
#include<stdio.h> #include<conio.h> #include<stdarg.h> #include<string.h> #include<stdlib.h> int quantity,sandwichtotal,milkshaketotal,cheesecaketotal,...
[4 replies] Last: wouldn't it make more sense to have one struct FoodItem instead of mi... (by dhayden)
April 2016 Pages: 1... 1415161718... 23
  Archived months: [mar2016] [may2016]

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