Sunday, July 12, 2009

I need help with a c++ program please?

im getting some errors in my program that i dont know how to fix help please


ill post the program first and then the errors





#include%26lt;iostream%26gt;


#include%26lt;fstream%26gt;


using namespace std;


void tally(int%26amp;,int%26amp;,int%26amp;,int%26amp;,int%26amp;...


void print(int, int, int, int);





int main() {





cout%26lt;%26lt;"CS-114 Ballot Counter"%26lt;%26lt;endl%26lt;%26lt;endl;


int p1,p2,vp1,vp2,s1,s2,t1,t2,j1,j...








cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Presidency:"%26lt;%26lt;endl;


print(1, 2, p1, p2);





cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Vice Presidency:"%26lt;%26lt;endl;


print(3, 4, vp1, vp2);





cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Secretary:"%26lt;%26lt;endl;


print(5, 6, s1, s2);





cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Treasurer:"%26lt;%26lt;endl;


print(7, 8, t1, t2);





cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Judge:"%26lt;%26lt;endl;


print(9, 10, j1, j2);





cout%26lt;%26lt;endl%26lt;%26lt;endl%26lt;%26lt;"Here's the race for the Senator:"%26lt;%26lt;endl;


print(11, 12, sen1, sen2);





}

I need help with a c++ program please?
I have never used C++, but just looking at the code, like in mathematics, it looks like you my be missing some brackets- like "}}}}" for the other side of your program code for your variables int p1,p2,vp1,vp2,s1,s2,t1,t2,j1, j.., and so on. Just like in Excel, mathematics, or any other program, your variables, Boolean logic, and other definitions will not work unless what you plug into the formulas follow certain procedures like Multiplication, Division, Addition, and Subtraction. I believe what you have at the top is what is called the Pseudo code (which describes what the program should do so this is only relevant to other programmers who want to know what your program should do).
Reply:What compiler you using with? it didn't show the line number where the error is, that's hard for you and us to know where is the error located.
Reply:What language is this???
Reply:i'm sick of that, why not u ask with the teacher.

cheap flowers

No comments:

Post a Comment