जब मैं इस कार्यक्रम चलाने का प्रयास करने पर मुझे त्रुटि है कि कार्यक्रम रुकती है और कहता है, "सीमा से बाहर वेक्टर सबस्क्रिप्ट"वेक्टर सीमा त्रुटि से बाहर सबस्क्रिप्ट, सी ++
किसी भी विचार क्या मैं गलत कर रहा हूँ मिल सकता है?
#include <vector>
#include <string>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
using namespace std;
//(int argc, char* argv[]
int main()
{
fstream bookread("test.txt");
vector<string> words;
bookread.open("test.txt");
if(bookread.is_open()){
cout << "opening textfile";
while(bookread.good()){
string input;
//getline(bookread, input);
bookread>>input;
//string cleanedWord=preprocess(input);
//char first=cleanedWord[0];
//if(first<=*/
//cout << "getting words";
//getWords(words, input);
}
}
cout << "all done";
words[0];
getchar();
}
http://stackoverflow.com/q/43108052/7276612[ हर समय काम नहीं कर रहा है। मैं गलत कहां जा रहा हूं?] [1] – DamienArt1234