>>string ****Nipples;
OMG what in hell are you trying to do here??? If you are trying to code an array of string's then its
string Nipples[4];
But the reading part should look like this: (I hope you change the variable names before turning in the assignment because your teacher may not be that humerious.)
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main()
{
ifstream RapidShit ("C:\\Rapid.txt");
vector<string> Nipples; // an array of strings
string line; // one line in the file
if(RapidShit.is_open())
{
while (getline(RapidShit, line) )
{
Nipples.push_back(line); // add to the array
}
// now you have the entire file in memory. Search each line
// for the desired entry.
}
cin.get();
return 0;
}
Last edited by Ancient Dragon; Dec 2nd, 2008 at 8:37 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.