g++ - g++编译错误: missing ';'

标签 g++ compiler-errors sstream

我正在尝试运行此代码

tResults = itos(Freq)+"\t"dtos(maxTemp)+"\t"+dtos(xB * FP.parU[1])+"\t"+dtos(xH * FP.parI[1])+"\t"+dtos(FP.parI[1]);

string MaxResults::itos(int i) 
{
    stringstream s;
    s << i;
    return s.str();
}

string MaxResults::dtos(double i) 
{
    stringstream s;
    s << i;
    return s.str();
}

当我尝试编译时,g++告诉我
 error: expected `;' before ‘dtos’

但我看不到那里需要分号。有没有我想念的概念,还是我只是个白痴?

最佳答案

tResults = itos(频率)+“\ t” dtos(maxTemp)

标签和dtos(maxTemp)之间缺少加号...

关于g++ - g++编译错误: missing ';' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6284641/

相关文章:

c++ - 忽略语法错误

c++ - 将单个字符转换为 std::string prepends\x01

c++ - 为什么这会在控制台中返回一个地址?

c++ - 在哪里可以下载适用于 Windows 的 GCC 4.3.2 二进制文件?

c++ - librdf 编译错误,未定义对 raptor_new_world_internal 的引用'

c++ - g++: const 丢弃限定符

gcc - 错误 : bad value for -march= switch

c++ - 如何在 Linux Mint 上安装 GCC 4.7.2?

c++ - g++ 使用模板时出现重复符号错误(菜鸟问题)

c++ - (C++) std::istringstream 从字符串读取最多 6 位数字到 double