I have a two dimensional array that needs to be loaded from a data file that contains last names and phone numbers and then I need to load another array with the addresses of those elements in the array. Is there a certain way to load a phone number since it has 361-987-9861 the line separator between numbers? Is it going to be like loading a comma delimited file? Please help.

Recommended Answers

All 2 Replies

How are the phone numbers and names stored in the file? Can you give us a sample?

How are the phone numbers and names stored in the file? Can you give us a sample?

They are in a .csv file that is opened in Excel for reading. I am setting a >> cout and it makes it all the way before the file is ready to be closed and the error is showing that as well.

Yaztremski 592-48-1003
Tilden 355-71-8210
Charles 290-65-8817
Balboa 458-12-9834
Watterson 234-98-0023
Jefferson 303-41-5692
Carmichael 392-60-0932
Martin 418-77-0974
Davila 339-89-4475
Jacobs 228-42-0547
Dobbs 219-52-4058
Nastromo 628-79-2516
Rivers 611-69-7045
Williams 498-12-3362
Georgopolis 204-65-8006
Espinosa 457-68-8103
Knight 566-10-3369
Morgan 285-69-2746
Lawrence 300-20-5638
Silverius 605-12-0882

Be a part of the DaniWeb community

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