troubleshooting Question

How to get the contents of a file?

Avatar of Reeds
Reeds asked on
System Programming
6 Comments1 Solution197 ViewsLast Modified:
I have the following structure of the data file:
Struct fileData
      CString empNo[10]
      CString empName[27]
      CString costCenter[7]

fileData *      m_fileData[]

Here empNo starts from 1, empName from 11 and cost center from 38th position.

I want to get the values for the different fields:
Loop thru file
M_fileData[i].empNo = field #1
M_fileData [i].empName = field #2
M_fileData [i].costCenter = field #3

I don't know the size of the file. How should I code this?

Freelance programmer / Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros