سلام من باویژوال استودیو کار میکنم واین کد رو مینویسم واین خطا ها رو میده برای تکمیلش راهنماییم کنید ممنون میشم
اینم خطاها
کد:
// Mashin.cpp : Defines the entry point for the console application.
//پروژه ماشین حساب مهندسی
#include "stdafx.h"
#include <iostream>
using namespace std;
#include<cmath>
#include<string.h>
float AmaleAsli();
int _tmain(int argc, _TCHAR* argv[])//یونیکد برای زبان فارسی
{
cout<<"Ebteda Yek Adad Vared konid Sepas Yek Operator(+,-,*,/)Va dar Akhar Adade Dovom Ra Vared Konid.\n";
float a,b;
char Amalgar;
cin>>a>>Amalgar>>b;
switch (Amalgar)
{//start of switch
case'+':cout<< a+b<<endl;break;
case'-':cout<< a-b<<endl;break;
case'*':cout<< a*b<<endl;break;
case'/':cout<< a/b<<endl;break;
}//end of switch
return 0;
}//end of main()
float Riazi;
int main()
{//start of main2
cout<<"Baraye, Sin ,Klide, s , Ra Vared Konid \n Va Baraye, Cos ,Klide, c ,Ra vared Konid.\nHamchenin Baraye, tg ,Klide, t ,Ra Bezanid\nVa Baraye, Jazr ,Klide, q ,Ra Vared Kardeh\n Va Sepas Adade Morede Nazar Ra Vared Konid\n";
double a;
char Amalgar;
cin>>Amalgar>>a;
switch (Amalgar)
{//start of switch2
case's':cout<< sin(a);break;
case'c':cout<< cos(a);break;
case't':cout<< tan(a);break;
case'q':cout<< sqrt(a);break;
}//end of switch2
return 0;
void b(double);
{//start of void
cout<<"Baraye 4 AmaleAsli: 1 ra Vared Konid Va Baraye Mosalasat 2 Ra Vared Konid\n";
int u;
cin>>u;
if(u==1)
{//start of if
float m=AmaleAsli();
cout<<m;
}//end of if
else
{//start of else
double v;
v=Riazi;
cout<<v;
}//end of else
}//end of void
void main();
for (int i=0;i<100;i++)
int a()
}//end of main2
کد:
[LEFT]1>------ Build started: Project: Mashin, Configuration: Release Win32 ------
[/LEFT]
1>Build started 2011-05-28 17:26:59.
1>ClCompile:
1> Mashin.cpp
1>Mashin.cpp(64): error C2556: 'void main(void)' : overloaded function differs only by return type from 'int main(void)'
1> Mashin.cpp(31) : see declaration of 'main'
1>Mashin.cpp(64): error C2371: 'main' : redefinition; different basic types
1> Mashin.cpp(31) : see declaration of 'main'
1>Mashin.cpp(67): error C2143: syntax error : missing ';' before '}'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.19
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========