Search Results

Showing results 1 to 40 of 40
Search took 0.01 seconds.
Search: Posts Made By: student4lyfe
Forum: C++ Aug 5th, 2008
Replies: 7
Views: 824
Posted By student4lyfe
had to step back in the program to see if I could simplify the program and this is what it looks like. I need help getting the program to calculate the total rainfall.

#include <iostream> //...
Forum: C++ Aug 5th, 2008
Replies: 7
Views: 824
Posted By student4lyfe
ok I got this far with the code and still end of with 16 errors.

#include <iostream> // standard IO routines
#include <iomanip> // for output formatting
#include <fstream> //...
Forum: C++ Aug 5th, 2008
Replies: 7
Views: 824
Posted By student4lyfe
I am trying to write a program that uses a structure to store the following weather data for a particular month:

Total Rainfall
High Temperature
Low Temperature
Average Temperature

The...
Forum: C++ Aug 5th, 2008
Replies: 7
Views: 824
Posted By student4lyfe
I have a program due shortly and I can't get this to work. I have many errors that show up and can't figure them out. Can I get some help to get me on the correct path.

// This program shows a...
Forum: C++ Jul 30th, 2008
Replies: 9
Views: 623
Posted By student4lyfe
ok I aedome more words to my list and it takes computer and computer as not being anagrams but impression and permission which are anagrams and says that they are not. the code below is the updated...
Forum: C++ Jul 29th, 2008
Replies: 9
Views: 623
Posted By student4lyfe
i hope this makes it easier to read

#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>

using namespace std;

string anagram(const string& firstWord, const string&...
Forum: C++ Jul 29th, 2008
Replies: 9
Views: 623
Posted By student4lyfe
the other words work it just those two. I even created a different file to test the program because I know that the professor will use some words that are very close to being anagrams to see if it...
Forum: C++ Jul 29th, 2008
Replies: 9
Views: 623
Posted By student4lyfe
computer computer
bacterial calibrate
Forum: C++ Jul 29th, 2008
Replies: 9
Views: 623
Posted By student4lyfe
I have a program that deals with anagrams and for the most part the program works but on a few of the words that should be it says that they aren't and one says it is and it's not. can someone help?...
Forum: C++ Jul 26th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
I'm get an error in my function that calls the program to keep count of the money error C2447: '{' : missing function header (old-style formal list?)

#include <iostream>
#include <fstream>...
Forum: C++ Jul 26th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
i'm assuming with the additionof some code I some how killed my play again statement
could someone look at the statement Lines 83-85 for me?

#include <iostream>
#include <fstream>
#include...
Forum: C++ Jul 26th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
thax, now back to the hard stuff
Forum: C++ Jul 26th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
ok I had to take a break from the functins before I went crazy. I got the program to run with a bet but when it trys to walk passed the the bet I get an error. can someone help with my beting...
Forum: C++ Jul 25th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
now I'm getting a bunch of error messages. now the program is saying that all of my varables are undefined and that my GetGuess function definition is illegal.
What is wrong with the guess function?...
Forum: C++ Jul 25th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
I got the enter void GetBet(int money, int& bet) function to work. it turns out that i called the int bet twice and then instead of using the while i used the if statement and it ran. Thanks
Forum: C++ Jul 25th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
also itried what you said and still got an error. Imust be missing a step.
Forum: C++ Jul 25th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
I was told that you are suppose to declare your variables in your functions
Forum: C++ Jul 25th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
Ok, this is what I wrote for my next function but I am getting an error saying that bet is not declared. Can someone tell me what I am doing wrong?

#include <iostream>
#include <fstream>...
Forum: C++ Jul 24th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
i just compiled it and I found the error. Here is the code that I got to work:




#include <iostream>

#include <fstream>

#include <string>
Forum: C++ Jul 24th, 2008
Replies: 18
Views: 1,283
Posted By student4lyfe
I have a program for clas that requires me to write a random number guessing game. I completed the game but i have to use functions in the program and I am not to familiar with this. Can some one...
Forum: C++ Jul 17th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
so what your saying is that I need to do an


if (minutes >= 5)
band == 5000;

and this will or should run corretly in the program
Forum: C++ Jul 17th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
with a little work I got it to do both simulations except it won't subtract the additional 50000 once the ants hit 50 yards. Also I want to make it where after five minutes the band can only stomp...
Forum: C++ Jul 16th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
when the ants reach the 50 yard line the professor sprays the ants with bug spray that can kill an additional 50000 ant instantly.
Forum: C++ Jul 16th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
the band can stomp 10000 ants per min which was my "count" the ants start at the e1 yrd line which is set to zero because they have not started eatinf yet and there are 50000 ants lined up at the one...
Forum: C++ Jul 15th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
the 50000 comes from the data file. the program should read the data that looks like this
50000 1
200000 25
80000 25
90000 25
50000 1
60000 1
60000 10
60000 20
0 ...
Forum: C++ Jul 15th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
From the writeup that I have it looks as if the 1st colum of numers are the number of ants and the second is the yards travled. My issue is that trying to subtract the number of ants killed by the...
Forum: C++ Jul 15th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
After doing what you suggested what I ended up with was the program just reading the text file and echo what the file says. I tried a few different variationsof what you gave me and one nearly worked...
Forum: C++ Jul 15th, 2008
Replies: 15
Solved: do while loop
Views: 1,568
Posted By student4lyfe
I'm trying to read a text file into a do while loop. For some reason I can't get it to countinue until ants = 0 . there are two different simulations, once ants go to o the counter needs to reset...
Forum: C++ Dec 3rd, 2007
Replies: 9
Solved: Dating Game
Views: 975
Posted By student4lyfe
If I try to cin the firstname i get an error and also I can't get the answer to print all 10.
#include <iostream>
#include <fstream>
#include <ctime>
#include <cmath>
#include <cstring>...
Forum: C++ Dec 3rd, 2007
Replies: 9
Solved: Dating Game
Views: 975
Posted By student4lyfe
I tried it with the corrections you suggested and know the program won't read the file or at least it won't cout any of the information.
Forum: C++ Dec 3rd, 2007
Replies: 9
Solved: Dating Game
Views: 975
Posted By student4lyfe
This is a sample of the text file.

M 1234554321 Henry Kissenger
F 2543122451 Janet Jackson
F 5432112345 Madonna
M 1542213452 Tom Cruez
Forum: C++ Dec 3rd, 2007
Replies: 9
Solved: Dating Game
Views: 975
Posted By student4lyfe
I need some real serious help. I have been trying to get this program to work for the last past week and everytime I get one part to work and try to complet the next section the previous section...
Forum: C++ Nov 14th, 2007
Replies: 7
Views: 1,198
Posted By student4lyfe
figured out the calculation issue but still having the line problem. And to answer you question about reading binary data from a file in that manner yes you can. The program work except the added...
Forum: C++ Nov 14th, 2007
Replies: 7
Views: 1,198
Posted By student4lyfe
could there be something in my loop that is causing it to give me the incorrect wait time? My loop count also count one extra line for some reason.
Forum: C++ Nov 14th, 2007
Replies: 7
Views: 1,198
Posted By student4lyfe
The input come from a text file that is hard coded into the program. it reads in all the correct data and print it out fine. At the bottom of my first post is the input arrival , service and the...
Forum: C++ Nov 14th, 2007
Replies: 7
Views: 1,198
Posted By student4lyfe
I have an issue with a section of code that will not work correctly. The first instance work fine but everything after is junk data.

int arrivaltime = 0;
int servicetime = 0;
int waittime =...
Forum: C++ Nov 13th, 2007
Replies: 5
Solved: interger pairs
Views: 1,364
Posted By student4lyfe
I see where I made my error in my code now. I kept trying to use the in.get() instead of in.getline statement. Thank you for your help.
Forum: C++ Nov 13th, 2007
Replies: 5
Solved: interger pairs
Views: 1,364
Posted By student4lyfe
so it is my understanding that you think that using a modulus in this case would cause a problem?
Forum: C++ Nov 12th, 2007
Replies: 5
Solved: interger pairs
Views: 1,364
Posted By student4lyfe
Could anyone help me with an issue that I have? I have a program that reads from a data file using an array and the data is structured as a long interger. I am trying to break up a long interger in...
Forum: C++ Oct 28th, 2007
Replies: 1
Views: 1,222
Posted By student4lyfe
This is my first time posting an I need some quick help. I need to get this program to work for two players. once Player 1 loses Player 2 gets their turn. the program works fine just can't figure...
Showing results 1 to 40 of 40

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC