im getting 2 errors in my program.....cant figure out WHAT they mean! can anyone plz plz plz help me correct those errors bc i need o turn this in, in 2 days and im getting very nervous about it.
THANK U.............![]()
This is a discussion on 2 errors !!! within the C++ Programming forums, part of the General Programming Boards category; im getting 2 errors in my program.....cant figure out WHAT they mean! can anyone plz plz plz help me correct ...
im getting 2 errors in my program.....cant figure out WHAT they mean! can anyone plz plz plz help me correct those errors bc i need o turn this in, in 2 days and im getting very nervous about it.
THANK U.............![]()
I dont really have time to take that code and compile it and see what happens... Sorry, i wish i did. If you posted your errors maybe i can tell you whats wrong?
"There's always another way"
-lightatdawn (lightatdawn.cprogramming.com)
I fixed a bit - see the /*! commentsCode:class dice { int N; char A; char F; char X; void value_num (int N); void value_frt (char F); void value_ani (char A); void EX (char X); public: dice(int, char, char, char); void operation (int,char,int); };/*!added!*/ dice::dice(int set_num, char set_frt, char set_ani,char ex) { N = set_num; F = set_frt; A = set_ani; X = ex; } void /*!added!*/ dice::operation( int set, char value,int act) { /*!deleted - no input declared!*/ // cout<<"Roll the dice?"<<input<<"\n"; switch(act) { case 1 : set_num(N),value_num(N); break; case 2 : set_frt(F),value_frt(F); break; case 3 : set_ani(A),value_ani(A); break; case 4 : ex(X),value_ex(X);break; default: /*! was deafult!*/: cout<<"Thank you for palying!"<<act<<"\n"; break; } }
But you really ought to start paying attention to your spelling.
Like all these member functions are either missing or spelled wrong
My advice is you try and compile when you've added ONE function, not when you've written the whole program.Code:cpr-test.cpp:44: warning: implicit declaration of function `int set_num(...)' cpr-test.cpp:45: warning: implicit declaration of function `int set_frt(...)' cpr-test.cpp:46: warning: implicit declaration of function `int set_ani(...)' cpr-test.cpp:47: warning: implicit declaration of function `int ex(...)' cpr-test.cpp:47: warning: implicit declaration of function `int value_ex(...)' cpr-test.cpp:48: parse error before `:' cpr-test.cpp: At top level: cpr-test.cpp:55: no `void dice::num(int)' member function declared in class `dice' cpr-test.cpp: In method `void dice::value_num(int)': cpr-test.cpp:58: parse error before `}' cpr-test.cpp: At top level: cpr-test.cpp:63: no `void dice::frt(char)' member function declared in class `dice' cpr-test.cpp:71: no `void dice::ani(char)' member function declared in class `dice' cpr-test.cpp:79: no `void dice::ex(char)' member function declared in class `dice'