08/02/25 14:08:07
ぜんぶcです・・・・
#include <iostream>
#include<typeinfo>
using namespace std;
template<size_t N> void g(const char (&a)[N]) { cout << "a" << endl;}
template<size_t N> void g(char (&a)[N]) { cout << "b" << endl; }
void g(char *&p){ cout << "c" << endl; }
template<typename T> void f(T& t) { g(t); }
int main() {
f("abc");
char a[5]; f(a);
char *p; f(p);
}