Hi,
I've written some fnc and when I tested it it works perfectly but when I switch from debug mode to release mode I'm getting error:
Intrisinc function, cannot be defined. Any idea what's wrong?

typedef unsigned int u_int;
int strcmp(const char* s, const char* s1)
{
	u_int size_s = 0;
	while (*s) //getting size of first c-string
	{
		++size_s;
		++s;
	}
	s -= size_s; //moving to the beginning
	u_int size_s1 = 0;
	while (*s1)//getting size of second c-string
	{
		++size_s1;
		++s1;
	}
	s1 -= size_s1; //moving to the beginning
	s_int result = 0;
	while (*s && *s1 && (!result))
	{
		result = *s - *s1;
		++s;
		++s1;
	}
	if (!result && (size_s < size_s1))
	{
		result -= 1;
	}
	if (!result && (size_s > size_s1))
	{
		result += 1;
	}
return result;
}

Thanks for any help.

Have you included the <cstring> library and have the following declared using namespace std; If so I think that the compiler is confused on using your strcmp function or the one that is already defined in the cstring header.

Or else even if you have not included the header file. Your compiler is still confused of ambiguity because of THIS!! clicky

Sky Diploma thank you. Renaming fnc made the difference.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.