10 Mar
2009
10 Mar
'09
4:27 p.m.
AMDG Joost Kraaijeveld wrote:
#include <iostream> #include
#include int main(int argc, char** argv){
boost::gregorian::date date = boost::gregorian::day_clock::local_day(); std::cout << boost::gregorian::to_sql_string_type(date) << std::endl;
return 0; }
The error is:
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Main.d" -MT"Main.d" -o"Main.o" "../Main.cpp" ../Main.cpp: In function ‘int main(int, char**)’: ../Main.cpp:18: error: no matching function for call to ‘to_sql_string_type(boost::gregorian::date&)’
I cannot find any solution anywhere hence my question: what am I doing wrong, and more important, how can I get it working?
You need either to_sql_string_type<char>(date) or just to_sql_string(date) In Christ, Steven Watanabe