Too many problems in your code as I see :
string str[0];
int i=0;
while(!myFile.eof())
{
getline(myFile, str[i], '\n');
vec.push_back(i);
}
line 1 : string str[0] will result in some unexpected value and not the string you want it to hold so change it to string str;
but as you want to use it in getline function its better you take it as character array as char str[100];
line 3 : eof() function usage is bad and is to be avoided when ever possible,you'll find a lot of discussion in this community regarding this.Instead use good() if you want.
line 5 : Proper format of getline is istream& getline (char* s, streamsize n );
istream& getline (char* s, streamsize n, char delim );
If myfile is your file handle then call getline as:
myFile.getline(str,100,'\n');
General:
The successful number of getlines you can do with a large character array will give you the number of rows directly.
And once you have a line at your disposal then the total number of columns would be number of '\t' characters in that line plus one.
You can use this to simplify your work.