By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,404 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,404 IT Pros & Developers. It's quick & easy.

Getting contents of a CSV file into a C array

P: 1
HI,

I am building a project on Vaccination Strategy. I am engineer who has a basic about quite a few languages but dont hav expertise in any(since my background is not CIS).

Now I have to import data from an excel file into a C program. I have convereted that file in a CSV file. Now hows do I import various rows from the lines in tht file. As in each line of my CSV file is of the format:
100, 300, 450, 3, 67 (these are just arbid numbers).

Now I want to define a structure hich has 5 variables named poplulation, surrounding, visits, id, infected to which i want to assign values in the line above in the same order. this way I will have various instances of a structure each holding 5 values.

can some one help me out with the coding?

AB
Mar 8 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.