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
Post a Comment