Try and fix jon's print problem
This commit is contained in:
parent
100b38f14e
commit
3dfe1fb8bd
@ -40,7 +40,7 @@ struct Test
|
|||||||
double md;
|
double md;
|
||||||
};
|
};
|
||||||
|
|
||||||
void print(const std::string &s)
|
void print_out(const std::string &s)
|
||||||
{
|
{
|
||||||
std::cout << "Printed: " << s << std::endl;
|
std::cout << "Printed: " << s << std::endl;
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ int main()
|
|||||||
//Register a new function, this one with typing for us, so we don't have to ubox anything
|
//Register a new function, this one with typing for us, so we don't have to ubox anything
|
||||||
//right here
|
//right here
|
||||||
//JDT: Was giving me compiler errors (not sure why)
|
//JDT: Was giving me compiler errors (not sure why)
|
||||||
//ss.register_function(boost::function<void (const std::string &)>(&print), "print");
|
ss.register_function(boost::function<void (const std::string &)>(&print_out), "print");
|
||||||
|
|
||||||
//Now we have a print method, let's try to print out the earlier example:
|
//Now we have a print method, let's try to print out the earlier example:
|
||||||
//so, we dispatch the to_string and pass its result as a param to "print"
|
//so, we dispatch the to_string and pass its result as a param to "print"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user