No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Im trying to output the population increase for a population. the problem is my for loop doesn't increment or add correctly. here is a sample output. i made it easy with no death rate and a population of 100 to easily calculate the increase in my head. Starting Population: 100 … |
|
Im trying to get the smallest number out of a series of user generated numbers. i can correctly get the largest number but i always get the negative 99 for the smallest. im working out of a c++ book that does not provide solutions, i tried to catch the -99 … |
|
i got c++ off amazon, no solutions are provided for the end of chapter exercises my problem is with getting larger numbers to be only two decimal places. i know about setprecision and how it works for the smaller numbers but when i enter a large number for days worked … |
|
I created a program that ask a user to pick a service package and tell them how much it is going to cost, what i cant figure out is how to get the program to tell them how much they would have saved if they had gone with a different … |
|
Im trying to complete exercises out of a c++ book that does not provide solutions. The first part was to just ask for internet package choice and output the cost of it as well as any additional fees. The part im having trouble with is: "Modify the program to show … |
|
I am currently going through a c++ book trying to do the problems at the end of the chapters. They dont provide solutions so im kind of stuck. My problem is: Write a program that uses a loop to display the characters for each ASCII code 32 through 127. Display … |
|
Im trying to learn c++ and i got a book which is not that great in my opinion, due to errors. one of my problems im having with one of the exercises is trying to set values for food, land. every time i run the program i get a bunch … |
|
I am supposed to read in data from a file and store it. I know how to read from a file and display it, in main, what i don't understand is how to do that with classes and objects. This is the part im having a little trouble with and … |
|
i keep getting this error in my main.cpp [code]main.cpp:17: undefined reference to `Game::Game()'[/code] this is the code i have pertaining to the error [code] #include "Game.h" #include<iostream> #include<cstring> #include<iomanip> #include<cctype> #include<fstream> #include<string> int main() { ifstream din; Game output; output.fillGame(din); return 0; } [/code] i doubt it but just in … |
|
Im trying to read from a file using classes and objects. i keep getting this error [CODE]main.cpp:16: error: no matching function for call to ‘Game::fillGame()’ Game.h:41: note: candidates are: bool Game::fillGame(std::ifstream&)[/CODE] here is code that goes with the error [CODE] //Game.h bool fillGame(ifstream & din); [/CODE] [CODE] //Game.cpp #include<iostream> #include … |
|
I am having trouble on figureing out on how to return more than one value for x and Y. I know you can only have one return statement but i need to return a value for x and y. I am a little lost on how to do this. This … |
|
Re:
help me with this kind of program,i have tried to declare those variables but it continues to say u ndeclared identify CBDA [CODE]#include<iostream> using namespace std; int main() { float catergory A; float catergory B; float catergory C; float catergory D; const float Catergory of pair A = -999,99; const … |
|
[CODE] // this is main.cpp // stuck on getting the ouput of the distance NOT to be 0 i think its someting to do with the variables // in the distance method in the point.cpp file // The invokeX and invokeY are set to 0,0 cout << "The distance from … |
|
I am trying to get the midpoint between two points. one of the points by default is (0,0). The other point is entered by the user. the problem i am having is getting it to work correctly from the point class in point.cpp. it worked correctly when i put it … |