¿äÁò ¼öÇÐ ÇÁ·Î±×·¥ °³¹ßÁßÀä.
Áö±Ý ÄÄÆÄÀÏ Áß ¿¡·¯°¡ ³ª¼¿ä..
#include <iostream> #include <cmath>
using namespace std;
class Calc { private : double answer, A, B; int flag = -1 ; int op; public : double calc(double ansawer, double A, double B, int op) ; { cout << "¿¬»ê¹æ¹ýÀ» °ñ¶óÁֽʽÿÀ" << endl; cout << "µ¡¼ÀÀº 1¹ø,»¬¼ÀÀº 2¹ø,°ö¼ÀÀº 3¹ø, Á¦°öÀº 4¹ø, ³ª´°¼ÀÀº 5¹ø, Á¦°ö±ÙÀº 6¹øÀÔ´Ï´Ù." << endl; cin >> op ; switch (op) { case '1': cout << "¿¬»êÇÒ ¼ö´Â? (µÎ¼ö)" << endl; cin >> A ; cin >> B ; ansawer = A + B ; break; case '2': cout << "¿¬»êÇÒ ¼ö´Â? (µÎ¼ö)" << endl; cin >> A ; cin >> B ; ansawer = A - B ; break; case '3': cout << "¿¬»êÇÒ ¼ö´Â? (µÎ¼ö)" << endl; cin >> A ; cin >> B ; ansawer = A * B ; break; case '4': cout << "¿¬»êÇÒ ¼ö´Â? (µÎ¼ö(ù¹ø°´Â ¹Ø,µÎ¹ø°´Â Áö¼ö))" << endl; cin >> A ; cin >> B ; ansawer = pow(x,y) case '5': cout << "¿¬»êÇÒ ¼ö´Â? (µÎ¼ö)" << endl; cin >> A ; cin >> B ; ansawer = A / B ; break; case '6': cout << "¿¬»êÇÒ ¼ö´Â? (ÇѼö)" << endl; cin >> A ; ansawer = sqrt(A) default : flg = 10000000000 } if (flg == -1){ cout << "¿¬»ê°á°ú : " << ansawer << endl; } else { cout << "¿¬»êÀÚ ÁöÁ¤ÀÌ Æ²·ÈÀ¾´Ï´Ù." << endl; return ansawer; } } class Area { public : double Area (double area, double x, double y, double pi) ;
private : double area; double x; double y; double pi = 3.141592653589793 } class equation{ private : double X; int a; int b; int c; int d; int e;
public : int first(int a; int b; double X;)
int second(int a; int b; double X; int c;)
int cubic(int a; int b; int c; int d; double X;)
int forth(int a; int b; int c; int d; int e; double X;)
} int main(){
return 0; }
Àε¥,
ÄÄÆÄÀÏ Çϸé
Error E2233 math.cpp 9: Cannot initialize a class member here Error E2040 math.cpp 13: Declaration terminated incorrectly Error E2040 math.cpp 80: Declaration terminated incorrectly ¶ó°í ³ª¿À°í ¾ÈµÇ¿ä.
Ã߽Š: ¹Ì¿Ï¼º ÀÛÀÔ´Ï´Ù. ¸ÞÀÎ ÀÌÇϺι® ,µµÇü¿¡¼ ¿¡¸®¾îÇÔ¼ö, ¹æÁ¤½Ä¿¡¼ 1,2,3,4Â÷ ¹æÁ¤½ÄÀÇ ÇÔ¼ö ¹Ì¿Ï¼º
|