D
Dark Knight
Hello,
I am working on a program to get use to the vector.h Templete class.
Program:
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main()
{
vector<string> v;
ifstream in("FillVector3.cpp");
string line;
while(getline(in, line))
v.push_back(line);
for(int i=0;i<v.size();i++)
cout<<i<" : "<<v<<endl;
return 0;
}
It gives me 9 errors:
8 error c2784 "'declaration' : could not deduce template argument for 'type'
from 'type'"
1 error c2677 "binary 'operator' : no global operator defined which takes
type 'type' (or there is no acceptable conversion)"
I am working on a program to get use to the vector.h Templete class.
Program:
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
int main()
{
vector<string> v;
ifstream in("FillVector3.cpp");
string line;
while(getline(in, line))
v.push_back(line);
for(int i=0;i<v.size();i++)
cout<<i<" : "<<v<<endl;
return 0;
}
It gives me 9 errors:
8 error c2784 "'declaration' : could not deduce template argument for 'type'
from 'type'"
1 error c2677 "binary 'operator' : no global operator defined which takes
type 'type' (or there is no acceptable conversion)"