Hello all,

I have a text file with columns of words

Boat Car Van
Sue Bird Hue
Billy Don Yoe...

How do I read each separate column into separate arrays.

Array 1 will read:
Boat
Sue
Billy

Array 2 will read:
Car
Bird
Don...

Any suggestions on how to accomplish this.

Thanks

Re: Extract columns from text file 80 80
  • read the file line by line
  • split the read line on empty character
  • strings received this way store in your arrays
Re: Extract columns from text file 80 80

Thanks peter_budo
I will try that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.