^James Stirling. Dictionary of Australian Biography.
延伸閱讀
Hasluck, Alexandra.James Stirling.Melbourne: Oxford University Press. 1963.
Statham-Drew, Pamela. James Stirling : admiral and founding governor of Western Australia Crawley, W.A. : University of Western Australia Press, 2003. ISBN 1876268948
外部連結
Celebrate W.A. site
The Constitution Centre of Western Australia. Captain Sir James Stirling 1828-1839. Governors and Premiers of Western Australia. West Perth, Western Australia: The Constitution Centre of Western Australia. 2002. ISBN 0-7307-3821-3.
10
1
I have a function that searches a vector of iterators and returns the iterator if its names matches a string passed as an argument. koalaGraph::PVertex lookUpByName(std::string Name, std::vector<koalaGraph::PVertex>& Vertices) { for (size_t i = 0; i < Vertices.size(); i++) { if(Vertices[i]->info.name == Name) return Vertices[i]; } } My question is how can I implement this as a lambda, to use it in connection with std::find_if ? I'm trying this: std::vector<koalaGraph::PVertex> V; std::string Name; std::find_if(V.begin(), V.end(), [&Name]() {return Name == V->info.name;}) But it says that V an enclosing-function local variable cannot be referenced in a lambda body unless it is in the capture list.
...