错误:无法添加两个指针 [英] Error: Cannot add two pointers

查看:136
本文介绍了错误:无法添加两个指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它给出了关于这段代码的标题中的错误:

It gives the error in the title about this piece of code:

string DDateTime::date2OracleDate(DATE Date)
{
    string s;
    s="TO_DATE('" + DateFormat("%d/%m/%Y",Date) + "','dd/MM/YYYY')";
    return s;
}



我不明白怎么可能,没有指针... 。

I don't understand how that is possible, no pointers involved....

编辑:

string DDateTime::DateFormat(string sFormat,DATE Date)
{
    struct tm tmTemp;
    RipOf_AfxTmFromOleDate(Date, tmTemp);
    RipOf_AfxTmConvertToStandardFormat(tmTemp);
    char sFormatted[MAX_TIME_BUFFER_SIZE];
    strftime(sFormatted, MAX_TIME_BUFFER_SIZE, sFormat.c_str(), &tmTemp);
    return sFormatted;
}


推荐答案

string DDateTime::date2OracleDate(DATE Date)
{
    string s = "TO_DATE('";
    s += DateFormat("%d/%m/%Y",Date);
    s += "','dd/MM/YYYY')";
    return s;
}

这篇关于错误:无法添加两个指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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