G33K [email protected] All your geek questions are belong to us.

 
LinkBack Thread Tools Display Modes
post #1 of 4 (permalink) Old 10-08-2007, 02:04 PM Thread Starter
Future King of the World
 
Mayo5's Avatar
 
Join Date: Nov 2005
Location: Tuscaloosa, Al
Posts: 2,307
 
Send a message via AIM to Mayo5
Need a little bit of C++ help Quick.

This is what I have....

Code:
#include<iostream>
using namespace std;
int Jeff_Anderson-Chris_Hester_Points, Richard_Billingsley_Points, Wes_Colley_Points, Kenneth_Massey_Points, Jeff_Sagarin_Points, Peter_Wolfe_Points;
double CoachesPoll(int);
double computerRankingsAvg();
double bcs_total, BCS_Average;


int main(){
       char ans = 'y';
       int harris, coaches;
       double bcs_total;
       while (ans == 'y'){
               bcs_total = 0;
               cout<<"Enter Harris Poll Points: ";
               cin>>harris;
               cout<<"Enter Coaches Poll Points: ";
               cin>>coaches;
               bcs_total+=HarrisPoll(harris);
               bcs_total+=CoachesPoll(coaches);
               bcs_total+=computerRankingsAvg();
               cout<<"BCS Average: "<<bcs_total/3<<endl;
               cout<<"Do you want to calculate another team's BCS average? (y/n)"<<endl;
               cin>>ans;
               cout<<endl<<endl;
       }
       return 0;
}
double Harris_Poll(int a){
       double answer;
       cin>>Harris_Poll_Points;
       answer=Harris_Poll_Points/2825.0;
       return answer;
}
double Coaches_Poll(int b){
       double answer;
       cin>>Coaches_Poll_Points;
       answer=Coaches_Poll_Points/1550;
       return answer;
}
double ComputerRankings (int c){
       for (c=0;c<6;c++){
              int Jeff_Anderson-Chris_Hester_Points;
               cin>>Jeff_Anderson-Chris_Hester_Points;
               if(Jeff_Anderson-Chris_Hester_Points >25){
                       cout<<"You have entered an invalid number";
                       cout<<"Jeff_Anderson-Chris_Hester_Points";
                       cin>>Jeff_Anderson-Chris_Hester_Points;
               }
               else{
                       cout<<"Jeff_Anderson-Chris_Hester_Points";
                       cin>>Jeff_Anderson-Chris_Hester_Points;
               }
              int Richard_Billingsley_Points;
               cin>>Richard_Billingsley_Points;
               if(Richard_Billingsley_Points>25){
                       cout<<"You have entered an invalid number";
                       cout<<"Richard_Billingsley_Points";
                       cin>>Richard_Billingsley_Points;
               }
               else {
                       cout<<"Richard_Billingsley_Points";
                       cin>>Richard_Billingsley_Points;
               }
              int Wes_Colley_Points;
               cin>>Wes_Colley_Points;
               if(Wes_Colley_Points>25){
                       cout<<"You have entered an invalid number";
                       cout<<"Wes_Colley_Points";
                       cin>>Wes_Colley_Points;
               }
               else {
                       cout<<"Wes_Colley_Points";
                       cin>>Wes_Colley_Points;
               }
             int Kenneth_Massey_Points;
               cin>>Kenneth_Massey_Points;
               if(Kenneth_Massey_Points>25){
                       cout<<"You have entered an invalid number";
                       cout<<"Kenneth_Massey_Points";
                       cin>>Kenneth_Massey_Points;
               }
               else {
                       cout<<"Kenneth_Massey_Points";
                       cin>>Kenneth_Massey_Points;
               }
             int Jeff_Sagarin_Points;
               cin>>Jeff_Sagarin_Points;
               if(Jeff_Sagarin_Points>25){
                       cout<<"You have entered an invalid number";
                       cout<<"Jeff_Sagarin_Points";
                       cin>>Jeff_Sagarin_Points;
               }
               else {
                       cout<<"Jeff_Sagarin_Points";
                       cin>>Jeff_Sagarin_Points;
               }
             int Peter_Wolfe_Points;
               cin>>Peter_Wolfe_Points;
               if(Peter_Wolfe_Points>25){
                       cout<<"You have entered an invalid number";
                       cout<<"Peter_Wolfe_Points";
                       cin>>Peter_Wolfe_Points;
               }
               else {
                       cout<<"Peter_Wolfe_Points";
                       cin>>Peter_Wolfe_Points;
               }
               if (Highest=Jeff_Anderson-Chris_Hester_Points){
                   cin>>Jeff_Anderson-Chris_Hester_Points;
               }
               if (Highest=Richard_Billingsley_Points){
                   cin>>Richard_Billingsley_Points;
               }
               if (Highest=Wes_Colley_Points){
                   cin>>Wes_Colley_Points;
               }
               if (Highest=Kenneth_Massey_Points){
                   cin>>Kenneth_Massey_Points;
               }
               if (Highest=Jeff_Sagarin_Points){
                   cin>>Jeff_Sagarin_Points;
               }
               if (Highest=Peter_Wolfe_Points){
                   cin>>Peter_Wolfe_Points;
               }
               if (Lowest=Jeff_Anderson-Chris_Hester_Points){
                   cin>>Jeff_Anderson-Chris_Hester_Points;
               }
               if (Lowest=Richard_Billingsley_Points){
                   cin>>Richard_Billingsley_Points;
               }
               if (Lowest=Wes_Colley_Points){
                   cin>>Wes_Colley_Points;
               }
               if (Lowest=Kenneth_Massey_Points){
                   cin>>Kenneth_Massey_Points;
               }
               if (Lowest=Jeff_Sagarin_Points){
                   cin>>Jeff_Sagarin_Points;
               }
               if (Lowest=Peter_Wolfe_Points){
                   cin>>Peter_Wolfe_Points;
               }
               bcs_total=Highest-Lowest;
               cout<<" BCS_Average";
               BCS_Average=Sum/100.0;
                   cin>>BCS_Average;
These are my errors.

Code:
1>------ Build started: Project: arhellman10474862P3, Configuration: Debug Win32 ------
1>Compiling...
1>arhellman10474862P3.cpp
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(3) : error C2143: syntax error : missing ';' before '-'
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(19) : error C3861: 'HarrisPoll': identifier not found
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(31) : error C2065: 'Harris_Poll_Points' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(37) : error C2065: 'Coaches_Poll_Points' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(43) : error C2143: syntax error : missing ';' before '-'
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(43) : error C2065: 'Chris_Hester_Points' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(109) : error C2065: 'Highest' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(127) : error C2065: 'Lowest' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(147) : error C2065: 'Sum' : undeclared identifier
1>l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(150) : fatal error C1075: end of file found before the left brace '{' at 'l:\visual studio 2005\projects\arhellman10474862p3\arhellman10474862p3\arhellman10474862p3.cpp(42)' was matched
1>Build log was saved at "file://l:\Visual Studio 2005\Projects\arhellman10474862P3\arhellman10474862P3\Debug\BuildLog.htm"
1>arhellman10474862P3 - 10 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
This is what I need to do.. I need to figure out a way for the final ranking system.(ComputerRankings) to throw out the Max and Min ranking, and keep the 4 median rankings.

Then create the BCS Average, by taking the sum and dividing it by 100.0


Any help on this would be insanely appreciated.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Mayo5 is offline  
Sponsored Links
Advertisement
 
post #2 of 4 (permalink) Old 10-08-2007, 07:11 PM Thread Starter
Future King of the World
 
Mayo5's Avatar
 
Join Date: Nov 2005
Location: Tuscaloosa, Al
Posts: 2,307
 
Send a message via AIM to Mayo5
An extremely nice guy on R1F, has helped me figure it out for the most part. You can delete the thread if you wish. Thanks though.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Mayo5 is offline  
post #3 of 4 (permalink) Old 10-08-2007, 09:51 PM
Ask the Chief
 
Firehawk's Avatar
 
Join Date: Jun 2005
Location: Right here.
Posts: 10,687
   
sorry i couldn't help bro....dunno anything about computer code.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Firehawk is offline  
Sponsored Links
Advertisement
 
post #4 of 4 (permalink) Old 10-10-2007, 08:30 AM
Gang Green
 
GreenEnvy's Avatar
 
Join Date: Mar 2006
Posts: 1,113
 
I see you solved it, but I was already looking through it before I saw that.

One issue looks like:
bcs_total+=HarrisPoll(harris);

You hadn't defined HarrisPoll in the code provided. There is a Harris_Poll, but no HarrisPoll.
I haven't continued looking for others because often subsequent errors go away when you fix one.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
GreenEnvy is offline  
Reply

Quick Reply
Message:
Options

Register Now



In order to be able to post messages on the Sport Bike Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.

User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.

Password:


Confirm Password:
Email Address
Please enter a valid email address for yourself.

Email Address:
OR

Log-in










Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Are The 800s So Quick? R1biker Racing 12 11-07-2006 04:29 PM
Rossi and Edwards quick to get going in Qatar R1biker Racing 4 02-06-2006 06:36 PM
CGI Chat walker G33K [email protected] 5 12-21-2005 10:19 PM
Quick Flick kneedragger77 Technique 6 09-11-2005 09:13 PM

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

 
For the best viewing experience please update your browser to Google Chrome