hey. I had written a project with VS 2010 and it had worked well. now i have installed VS 2013 and when i wanna debug current project, it says that my functions are ambiguous! pls help me...what do i have to do?
these r my codes:
#include<iostream>
#include"Read.h"
#include"Plus.h"
#include"Minus.h"
#include"Cross.h"
#include"Compare.h"
#include"Power.h"
#include"Division_Leftdivision.h"
using namespace std;
const int MAX=1000;
int main()
{
char r1[MAX],r2[MAX],ope;
int a[MAX]={0},b[MAX]={0},c[MAX]={0},la,lb,cntr,key;
int lhpas=0;
read(r1,a,la);
read(r2,b,lb);
plus(a,b,c,la,lb,cntr);
cross(a,b,c,la,lb,cntr);
cmp(a,b,la,lb,key);
minus(a,b,c,la,lb,cntr);
power(a,b,c,la,lb,cntr);
div_leftdiv(a,b,c,la,lb,cntr);
for(;cntr<MAX;cntr++)
cout<<c[cntr];
cin.get();
cin.get();
}
i checked all of my functions and they r all flawless.
Thats becuase the name of your functions already exist in the standard library. This is literally the reason people say use std:: and do not use usingnamespace std;
since you have using namespace std, "plus" is a thing in std, so when you use the name plus, visual studio is confused, doesnt know if you want your function or the std plus.
So, either 1. Start using std::
2. Change name for the minus, plus etc etc etc