How to skip columns in input.txt

My input txt file

1 2 3 4 5 6 New York
2 4 6 8 9 9 Los Angeles
1 2 3 4 5 6 Jersey City
1 2 4 5 6 2 Santa Monica

Hi everyone, I need to store the numbers into a 2d array and store the city names into a 1d array. I was able to do the 2d array of the numbers. However, I can't find a way to make the code skip the number columns and read the city names into 1d array.

I am new to C++. Any help will be appreciated...
Why do you want to skip the number columns ?
After you have read the 6 ints use getline to read the city names.
For each line of input
  Read N numbers into a row of 2d array
  Read name into 1d array
Can you give me a sample code about this?
Last edited on
Topic archived. No new replies allowed.