C++ implicit typename的问题# Programming - 葵花宝典
x*n
1 楼
请看看哪里有问题?
// temp.cpp, test stl iterator
#include
#include
#include
using namespace std;
template void print(const set& mySet, const string& name)
{
set::const_iterator i;
}
int main()
{
}
// end of file
cygwin下g++ 3.4.4:
$ g++ temp.cpp
temp.cpp: In function `void print(const std::s
tor<_chart> >&, const std::string&)':
temp.cpp:11: error: expected `;' before "i"
linux下g++ 3.2.3:
temp.cpp: In function `void print(const std::set,
// temp.cpp, test stl iterator
#include
#include
#include
using namespace std;
template
{
set
}
int main()
{
}
// end of file
cygwin下g++ 3.4.4:
$ g++ temp.cpp
temp.cpp: In function `void print(const std::s
tor<_chart> >&, const std::string&)':
temp.cpp:11: error: expected `;' before "i"
linux下g++ 3.2.3:
temp.cpp: In function `void print(const std::set