call of overloaded ambiguous

I've got two member functions and g++ is giving me an ambiguous error. This just may be the way stadarg works.

1
2
3
4
5
6
7
8
9
10
SAS::send(char code, int level, char *m) {
}

SAS::send(char code, int level, char *fmt, ...) {
  char buffer[1024]; 

  //Do stuff
  
  send(code, level, buffer); // THIS IS AMBIUGOUS!
}


Possibly there is no need to create 2 methods since stdarg will work with or
without arguments anyway?


I think you're correct. Since the second method will take the same arguments as the first, there's no way for the compiler figure out which one you're talking about.
Yes, the first function is not necessary.
Topic archived. No new replies allowed.