用VS2013编写《C++ primer》上的393页地图单词转换有关问题

用VS2013编写《C++ primer》上的393页map单词转换问题
提示这个错误,找不到外部符号
1>.obj源 : error LNK2019: 无法解析的外部符号 "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl transform(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &)" (?transform@@YAABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV12@ABV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@2@@Z),该符号在函数 "void __cdecl word_transform(class std::basic_ifstream<char,struct std::char_traits<char> > &,class std::basic_ifstream<char,struct std::char_traits<char> > &)" (?word_transform@@YAXAAV?$basic_ifstream@DU?$char_traits@D@std@@@std@@0@Z) 中被引用  
#include<iostream>
#include<fstream>
#include<vector>
#include<string>
#include<map>
#include<sstream>
//#pragma comment( lib, "ws2_32.lib.lib")
//#pragma comment( lib, "opencv_core231d.lib")
using namespace std;

map<string, string> buildMap(ifstream &map_file);
string &transform(string &s, map<string, string> &m);
void word_transform(ifstream &map_file, ifstream &input);

void word_transform(ifstream &map_file, ifstream &input)
{
auto trans_map = buildMap(map_file);
string text;
while (getline(input, text)){
istringstream stream(text);
string word;
bool firstword = true;
while (stream >> word){
if (firstword)
firstword = false;
else
cout << " ";
auto ou = transform(word, trans_map);
cout << ou; //此句加上 就出现无外部链接 
}
cout << endl;
}

}

map<string, string> buildMap(ifstream &map_file){
map<string, string> trans_map;
string key;
string value;
while (map_file >> key && getline(map_file, value)){
if (value.size() > 1)
trans_map[key] = value.substr(1);
else
throw runtime_error("no rule for" + key);
}
return trans_map;
}

string &trasform( string &s,  map<string, string> &m)
{
auto map_it = m.find(s);
if (map_it != m.cend())
{
cout << map_it->second;
return map_it->second;
}
else
cout<< s;
return  s;
}

int main()
{
ifstream map_file, input;
map_file.open("d:\\regular.txt");
input.open("d:\\translate.txt");
word_transform(map_file, input);
map_file.close();
input.close();
return 0;
}

------解决思路----------------------
transform没有定义啊