-5
我需要這個代碼幫助:錯誤C2064 - 我不知道我做錯了什麼
#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
我搜索與谷歌已經和搜索這個網站,但我沒有找到答案我可以使用。我有一個載有不同Ores的矢量,我嘗試數數並顯示它。我在另一個程序中嘗試了這種代碼,它工作得很好。
你在''和'(possibleOres)之間缺少一個'<<'' – CoryKramer
你在'cout <<'這一行中缺少'<<'There are「(possibleOres)< <'('(')之前) –
當您詢問有關錯誤消息的問題時,請在問題中包含錯誤消息。並非每個人都有您的特定編譯器,但是如果您有許多人可以解釋錯誤消息顯示它(並且解釋消息通常比掃描代碼找到原因更容易)。 –