Beginners - March 2017 (Page 5)

How to fix this loop so the calculations do not effect the NEXT set of numbers?
 
Question 1: If you input the grades of 93, -1, 97 90.. The average should be (93+97+90)/3 = 93.33, but it is displaying the average as 93.00, all the decimals a...
[5 replies] Last: If the scores have to be int (ideally unsigned int - they shouldn... (by TheIdeasMan)
Problem with Running and Debugging
 
Hi, I am trying to implement some simple function for a class project in Codeblocks. The code compiled fine but will not run. When I ran the debugger I keep get...
[15 replies] Last: @OP [quote=lastchance]- if I turn error messages up to maximum in C++... (by TheIdeasMan)
writing a program to calculate age?
 
I'm trying to write a program that will calculate the age of the user assuming the birthdate is after 2000. However, all the program prints is the date that the...
[4 replies] Last: I found out the problem! I forgot to write the formula for dday if cda... (by thhs345)
Function Overloading
 
Alright, so I'm having issues compiling this program, and I only have one error and I've been stuck on it for hours trying different things. It says "no overloa...
[2 replies] Last: I only have one error and I've been stuck on it A novice plumber was ... (by dhayden)
Multiplying two integer arrays
 
Hi! So I have a class called BigInt which stores exceedingly large integers in the form of a char array of digits. For example BigInt b1("123456789") would yiel...
[1 reply] : it works just like it would if you did it by hand. digit * digit = mo... (by jonnin)
Need help adding appropriate comments to program.
 
I need some help completing this assignment by adding appropriate comments to the program. Thanks for the help. #include <iostream> using namespace...
[1 reply] : if you wrote the program yourself just put down your thoughts next to ... (by gunnerfunner)
passing a std::list to function
 
I am trying to learn abouts lists. Can any on help me with my functions. I would like to pass my list to a function that sorts it using std::sort then I can dis...
[7 replies] Last: Sorry - I've been having a bad day. After a long hard look at what I w... (by jamesfarrow)
by xgj7
Help with permutations
 
Hello! So I have been solving some programming tasks and I came up to a program that requires me to test some easy cases on all permutations of a given 5x5 matr...
[3 replies] Last: Here's an outline of the steps for the permuatation of the rows: std:... (by gunnerfunner)
Errors in Program
 
I'm having a lot of trouble with this program I end up with a variety of errors and i'm not sure how to fix it #include <fstream> #include <iostream> #i...
[3 replies] Last: Got it, thanks for the help guys, I appreciate it. (by TommyGun4)
Windows Socket send() & recv() message Client-Server
 
I am trying to make a socket program pair a client and a server you run the server side and then the client side you connect to the server with the client type ...
[1 reply] : Wait! I've realized my error i think, I never printf("Message: %s", me... (by ExSanity)
by gtexxo
replaceSubstring function
 
The assignment is read as: Write a function named replaceSubstring. The function should accept three C-strings or string object arguments. Let's call them str...
[4 replies] Last: OP: if you are able and/or willing to use std::regex then you can pop ... (by gunnerfunner)
Generating a linked list
 
I am trying to write a program that generates a number of nodes equivalent to a valid integer entered by the user. That in itself isn't hard... the tricky part ...
[1 reply] : read the list of nodes forward and backward using the null to termina... (by gunnerfunner)
by mgala
Calling member functions of a class in main
 
Hello, I'm working on a program which implements a Hash Table. I want to call a member function which is intended to hash a string to an integer value. However...
[1 reply] : there are quite a few compile time warnings and one error returned by ... (by gunnerfunner)
need help writing a program
 
I'm writing a program in Visual Studio. The idea is to make create a sort of lobby module and add games to it as I go. I was wondering if anyone has any idea...
[2 replies] Last: Thanks for the assist. (by jbed2k17)
Why is my constructor not working in my operator overload?
 
Hello everyone! I am programming a polynomial class and am overloading the operators (+,-,*). I have my + operator coded I think. Except in my return statement ...
[2 replies] Last: Hi! Thank you! No this is great! I will definitely take some time late... (by bmakloski)
Loop Stops After One Run - Any Ideas?
 
Loop stops after one run - any ideas? #include <iostream> #include <cmath> #include <fstream> #include <string> #include <iomanip> using namespace ...
[1 reply] : // hola2 = inc_hh*3600 + inc_mm*60 + inc_ss; hola2 = end_hh*3600 + en... (by JLBorges)
Date class
 
can someone help me? i cant get the end of the month next day output correctly void Date::setYear(int y) { year=(y>= 1900 && y<4000)?y:0; } void...
[1 reply] : Something like this, perhaps: struct date { int day ; // 1 ... i... (by JLBorges)
Help writing a program?
 
I need help on how to determine the average of the test scores... if a -1 is entered for a test score grade it's an absence (so it should be ignored).. I know h...
[1 reply] : #include <iostream> using namespace std; int main() { int scores, st... (by arbwok)
reversing an array?
 
This problem is supposed to reverse an array without changing main. I've gotten to here, but for some reason it only reverses the first three elements of the ar...
[12 replies] Last: @OP Here's another way as a result of slight embellishment. Your diffi... (by closed account 48T7M4Gy)
Why Won't My Loop Put In The CSV My Pattern?
 
If you look at my loop here - I can't get the CSV it makes to contain everything I see in my application - any ideas? You're all so awesome for the expertise ! ...
[4 replies] Last: chico - thank you for the ideas! (by shycas2008)
March 2017 Pages: 1... 34567... 36
  Archived months: [feb2017] [apr2017]

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