template<typename T>
inline void doMax(const T& a, const T& b)
{
f(a > b ? a : b);
}
g++, not gcc.
#include <iostream>
#include <typeinfo>
using namespace std;
int main() {
int i;
cout << typeid(i).name();
return 0;
}
std::string getFile(const char *fname)
{
std::string fileLines;
std::ifstream infile(fname);
if (infile.is_open())
{
while (!infile.eof())
{
std::string curLine;
std::getline(infile, curLine);
fileLines += curLine + "\n";
}
infile.close();
}
return fileLines;
}