Code migration from gcc to SunStudio C++
Hi
Am new to C++ and have a project on hands which requires migrating the existing code written for gcc 3.2 compiler to Sunstudio 11. When I try to compile the code with CC, I get an error -
Error: abc(const char*) already had a body defined
I am trying to overload a method, one having the parameter as "const char*" and the other having a parameter as std::string::const_iterator.
#include <string>
using namespace std;
int main()
{
}
void abc (const char* a){}
void abc (std::string::const_iterator ptr){}
Although this works fine with gcc as well as Visual Studio, there is a compilation error with Sun's CC. Since such definitions exist a lot many times in my existing code, it would be very time consuming and laborious task to change the code and the logic everywhere.
Is there any compiler option that can be used to make CC compatible with gcc code? Or apart from compiler option is there any other way I can get away with making changes throught my code?
Thanks in advance

