내가 QT 작성자와 엑스 코드 4.63 (OSX의 MAV) 난 그냥 .set(....)
전화에는 멤버는
를 사용하고
no member named 'set' in 'std::vector<int, std::allocator<int> >
보일 오류를 다음있어 '
#include <cctype>
#include <cmath>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include "console.h"
#include "filelib.h"
#include "grid.h"
#include "gwindow.h"
#include "simpio.h"
#include "vector.h"
using namespace std;
int main() {
vector<int> myVector(10,0);
fstream mystream;
string getStream;
while(getline(mystream,getStream)) {
getline(mystream,getStream);
if(stringToInteger(getStream)>=0 && stringToInteger(getStream)<=9) {
myVector.set(0,(myVector[0]+1))
};
}
return 0;
};
오류는 매우 분명하다 : 당신이 값을 변경하려는 경우는 [] 연산자를 사용할 수 있습니다. 그 기능은 존재하지 않습니다. 'myVector.kerfluffle() '를 호출하면 같은 문제가 발생할 수 있습니다. –
오류가 명확합니다.'std :: vector'에는'set'이라는 메서드가 없습니다. – juanchopanza
사이드 노트 : 닫는 중괄호'}에 불필요한 세미콜론이 있습니다. ' – Hulk