如何将INT64写入CString [英] How to write INT64 to CString

查看:202
本文介绍了如何将INT64写入CString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在c ++窗口中进行编码.

I am coding in c++ windows.

INT64 dirID = -1;
CString querySQLStr = _T("");
querySQLStr.Format(L"select * from ImageInfo where FolderPath=%64d;", dirID);

querySQLStr always like this:
select * from ImageInfo where FolderPath=                                                            1214;

使用%64d是否正确? 非常感谢

is it right to use %64d? Many Thanks

推荐答案

我没有方便使用Windows机器的Windows机器,但是我认为CString应该接受:

I don't have a windows machine handy to test this on, but I think CString should accept this:

querySQLStr.Format("%I64d", dirID);

可能值得注意的是,这是特定于Windows的,但是由于您使用的是CString,所以我认为这是可以的.

It's probably worth noting that this is windows specific, but since you're using CString I guess that's okay.

这篇关于如何将INT64写入CString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆