hi everyone,
so I'm trying to read data from a text file into a vector but the data is like
13 24 12
45 23 12
so it goes as lines and i want to store them in the vector as lines. how will the program understands that it comes to the end of the line and stores each line as a pack? ıs there anything like multidimensional vectors ?? what should I do?
so i've been trying to learn about files and vectors and try to read data from file and transfer it into vector. data consists of 3 columns and 2500 rows of number. but the code below gives error saying one or more multiply defined symbols found which i couldn't understand. what is wrong??
void main()
{
int i,j;
vector<vector<double>>trial(2500,0);
ifstream infile;
infile.open("ambientvars.txt");
if(infile.is_open())
{
some.obj : error LNK2005: _main already defined in nearest neighbors.obj
C:\Users\dell\documents\visual studio 2010\Projects\nearest neighbors\Debug\nearest neighbors.exe : fatal error LNK1169: one or more multiply defined symbols found
You can have one and only one function with the name of main() in the global namespace. You appear to have two. Is the code you provided in nearest neighbors.cpp?