Convert decimal (SQL) to double C++

南笙酒味 提交于 2019-12-13 00:19:02

问题


I have a SQL query which return records with only one column of type decimal (18,18).

In the C++ code I need to convert each value to double to add it to an array.

What's the best way of doing it?

Thank you


回答1:


I would suggest converting it to a Real before taking it from the database they are roughly the same datatype. http://msdn.microsoft.com/en-us/library/ms173773.aspx



来源:https://stackoverflow.com/questions/6746010/convert-decimal-sql-to-double-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!