Parse errors! There attacking! Grr... no more errors with the calling of the function and return types... now just inconvienant parse errors that i'm about to blow a fuse at - everything seems in order - I checked syntax but I am sure I missed something =( take a look...
Code:
#include <iostream.h>
#include <stdlib.h>
char choice;
int ammount;
float a;
float b;
float c;
float d;
float answer;
class op_function {
public:
float op_add(float, float, float);
float op_add(float, float);
float op_sub();
float op_mul();
float op_div();
float op_sqr();
float op_sqr_root();
float op_pi();
float op_sin();
float op_cosin();
float op_tan();
float op_sci_notate();
float op_retansw();
};
int main() {
op_function op_funct;
cout << "Scientific Calculator Version 0.1 /n";
cout << "[01] Addition /n";
cout << "[02] Subtraction /n";
cout << "[03] Multiplcation /n";
cout << "[04] Division /n";
cout << "[05] Square /n";
cout << "[06] Square Root /n";
cout << "[07] Circle /n";
cout << "[08] Sin - Cosin - Tangent /n";
cout << "[09] Scientific Notation /n";
cout << "[10] Formulae /n";
cout << "[10] About Information /n";
cout << "Selection #: ";
cin >> choice;
cout << "/n";
switch(choice) {
case '1':
cout << "Addition Version 0.1 /n";
cout << "Supported: Three Floating Pnts. /n";
cout << "Specify Number Ammount: ";
cin >> ammount;
if (ammount == 1) {
cout << "Cannot Compute Value w/ One Number"; }
if (ammount == 2) {
cout << "Enter Num(1): ";
cin >> a;
cout << "/n";
cout << "Enter Num(2): ";
cin >> b;
op_funct.op_add(a, b) { //Parse Error Before '{'
return a + b; };
answer = op_funct.op_add(a, b, c);
cout << "Answer: = " << answer;
else { //Parse Error Before 'else'
cout << "Enter Num(1): ";
cin >> a;
cout << "/n";
cout << "Enter Num(2): ";
cin >> b;
cout << "/n";
cout << "Enter Num(3): ";
cin >> c;
op_funct.op_add(a, b, c) { //Parse Error Before '{'
return a + b + c;
answer = op_funct.op_add(a, b, c);
cout << "Answer: = " << answer; }
else { //Parse Errior Before 'else'
cout << "Cannot Compute Value w/ One Number"; }
break;
return(0); }
ahhh parse errors! ><