错误 C2064 — 我不知道我做错了什么
Error C2064 — I don't know what I did wrong
我需要有关此代码的帮助:
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <iterator>
using namespace std;
using namespace System;
int possibleOres;//int für die möglichen Erze
vector<string>::iterator Ore; //Iterator um das Ore auszuwählen
vector<string>::iterator Iter; //iterator deklariert
for(Iter = OreList.begin(); Iter != OreList.end(); Iter++)
{
possibleOres++;
}
cout << "There are " (possibleOres) <<" possible Ores."; //this part does not work
我已经用谷歌搜索了,并搜索了这个网站,但我没有找到我可以使用的答案。我有一个包含不同矿石的矢量,我尝试计数并显示它。我在另一个程序中尝试了这种代码,它工作得很好。
cout << "There are " (possibleOres) <<" possible Ores."
您之前缺少"<<"(可能)。 因此,编译器认为"There are "
是你尝试调用的函数。 因此,错误消息"term 不计算为采用 1 个参数的函数"。
相关文章:
- #定义c-预处理器常量..我做错了什么
- 努力将整数转换为链表。不知道我在这里做错了什么
- .h 和.cpp文件分离时出错,但仅使用 .h 文件时没有错误.我做错了什么?
- 我的C++线程做错了什么?
- 谁能告诉我我用 getline 做错了什么 (cpp) 格式
- 没有输出的合并排序我做错了什么?
- 我正在尝试使用 while 循环从字符串中删除字母,直到没有字母。我在这里做错了什么?
- 在C++中使用 AKS 素数测试计算双胞胎素数 我做错了什么?
- 我一直试图弄清楚我在这个链表程序中做错了什么
- 我正在尝试学习如何在 c++ 中传递指针,但出现错误:没有用于调用"test"的匹配函数。我做错了什么?
- FFMPEG,C++,内存泄漏,我做错了什么?
- 我做错了什么?反向字符串 C++
- 我在这个课上做错了什么?
- 创建整数的 2D 数组,该数组将使用两个函数用随机数填充矩阵.我做错了什么?
- 在不使用内置库函数的情况下添加字符串,我做错了什么?
- 我做错了什么?GetDiskFreeSpaceExA的功能根本不起作用
- 我在查找和字符串上做错了什么?
- 我正在尝试用 c++ 制作一个日志记录框架,但信息没有传递给记录器的子组件,我做错了什么?
- 我在尝试将多个值push_back向量时出错。我做错了什么?
- 插入排序:我做错了什么?