dictionary - Accelerated C++ header file not working -


i'm trying compile second exercise in chapter 7 written in book. created header file containing xref function:

#pragma once  #include <map> #include <string> #include <vector> #include "split.h"  std::map<std::string, std::vector<int> > xref(std::istream&, std::vector<std::string> find_words(const std::string&) = split); 

afterwards wrote .cpp file:

#include "xref.h" using namespace std;  map<string, vector<int> > xref(istream& in, vector<string> find_words(const string&) = split) {     ... } 

i cannot compile code, says parameter 1 not match. what's wrong?

the error message says went wrong: should specify default parameter value in function declaration, whereas did again in function definition. error refers last parameter of function.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -