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

need help with my c program

P: 6
dear all,
i need help with a C program which should read from a very large - maybe about 80 pages - data file of mixed data types which should be classified into groups . that is i have to create an additional column which denotes the class into which i have put it into. and then use this to to draw a graph. No not the plot of one variable with respect to another, but a data structure graph. Can some one help ?
I tried a sample one with if - else statements. But obviously this cannot be used with such a large data file where the no. of classes i put my data runs into 1000's.
do help someone
oormilarev
Dec 28 '06 #1
Share this Question
Share on Google+
4 Replies


10K+
P: 13,264
dear all,
i need help with a C program which should read from a very large - maybe about 80 pages - data file of mixed data types which should be classified into groups . that is i have to create an additional column which denotes the class into which i have put it into. and then use this to to draw a graph. No not the plot of one variable with respect to another, but a data structure graph. Can some one help ?
I tried a sample one with if - else statements. But obviously this cannot be used with such a large data file where the no. of classes i put my data runs into 1000's.
do help someone
oormilarev
Perhaps a bit more clarification on these points might help

Are you using C or C++?
You said the data types are classes which can exceed 1000 different classes?
Also if you can post the code you wrote with the if - else statements, it might be easier to visualize what you want to do.
Dec 28 '06 #2

P: 6
Perhaps a bit more clarification on these points might help

Are you using C or C++?
You said the data types are classes which can exceed 1000 different classes?
Also if you can post the code you wrote with the if - else statements, it might be easier to visualize what you want to do.
Dear r035198x

I am using C and not C++. Perhaps i have not stated my problem properly.I have a data file which is the earthquake catalogue of a region between two latitudes and two longitudes for maybe 50 years. Now i should read this file and and create a table which has the date, latitude,longitude, depth, magnitude and also an additional column which denotes a cell number. the cells are got by dividing the region into 0.1degree X 0.1 degree X 10 Km cells and assigning a number to each of these cells. This can run into 1000's depending upon how big a region i start off with. Each one degree latitude is divided into 10 cells .
Dec 28 '06 #3

10K+
P: 13,264
Dear r035198x

I am using C and not C++. Perhaps i have not stated my problem properly.I have a data file which is the earthquake catalogue of a region between two latitudes and two longitudes for maybe 50 years. Now i should read this file and and create a table which has the date, latitude,longitude, depth, magnitude and also an additional column which denotes a cell number. the cells are got by dividing the region into 0.1degree X 0.1 degree X 10 Km cells and assigning a number to each of these cells. This can run into 1000's depending upon how big a region i start off with. Each one degree latitude is divided into 10 cells .
I did not understand all of what you've just posted(my ignorance, maybe someone else will), but what format is the data file(txt, doc etc)?
Are you able to write code that reads the contents of the file? As long as you can open the file and read its contents, manipulating it with degrees or km or whatever it is that you were talking about there should then be easy. Start by writing the part that reads the contents of the file.
After that, this table that you want to create, what format should it be in? Is it a text file, .doc, .xls or some other fancy format?
Dec 28 '06 #4

P: 6
The data is xls. file and i can read the file though i do not know how to manipulate the data to create the extra field for the cells that i was telling you about. the data file has int and float fields .
Dec 29 '06 #5

Post your reply

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