Results 1 to 3 of 3

Thread: Overloading problem

  1. #1
    DaoK
    Guest

    Overloading problem

    here is message of the compiler :

    Code:
    util.h(103) : error C2244: 'EqualOrNot' : unable to resolve function overload
    here is the function :
    Code:
    bool utility::EqualOrNot(char *x, char *y)
    {
    	if (strlen(*x) != strlen(*y))
    		return 0;
    	for (unsigned short int i = 0; i < strlen(*x); i++)
    		if (*x[0] != *y[0])
    			return false;
    	
    	return 1;
    }

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Make sure the declaration of your function is like:
    bool EqualOrNot(char *x, char *y);
    Baaaaaaaaah

  3. #3
    DaoK
    Guest
    thx you, but now it's POINTER and I wanted to try with reference grrr lets me try to change that

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width