To tylko jedna z 2 stron tej notatki. Zaloguj się aby zobaczyć ten dokument.
Zobacz
całą notatkę
Matching overloaded functions no more than one conversion per argument pick lowest match level, ambiguity is an error 1. exact match (no conversion, but table to pointer, function to pointer, T to const T) 2. promotions (int to long, char to int, unsigned to long unsigned, float to double, etc.) 3. standard conversions (unsigned int ↔ int, int ↔ double, derived * to base *) 4. user defined conversions 5. variable argument list (…) int f(int); double f(double) void f(); int j=f(1); // OK int k=f(1.0); // OK, call double f(double), // then convert result to int //int n=f(”Abc”); ERROR! no standard conversion // char * to int or double
... zobacz całą notatkę
Komentarze użytkowników (0)