
18 Apr
2011
18 Apr
'11
1:06 p.m.
Artyom wrote:
If so please implement following in C correctly:
void delete_values_above_x(double x) { char statement[256]; snprintf(statement,sizeof(statement),"DELETE FROM sometable WHERE x > %f",x); mysql_query(connection,statement) }
When in current locale the decimal point is "," and x=3.14...
You can't do it in reasonable simple way in C. It is design issue of standard C and C++ library.
Artyom
While I agree about the standard C library, what issue does C++ standard library have here? You can just imbue std::locale::classic() and you are good to go. Am I missing something? Gevorg