0

ive been thinking about this for a long time but I still have no idea of what T would be in case follow.

template <typename T>
void print(const T& a) {
  std::cout << a;
}
int main()
{
print("hello");
}

I know

void print(const char* const& a)
{
  std::cout << a << "here";
}

would work so I am assuming T would be char* const. I just wanna be crystal clear.

what would T be?

juhak lee
  • 1
  • 1

0 Answers0