   parsing project - a little guidance needed.
  One of my clients needs some new data for his surf site. As of now I parse buoy data from the NOAA into an XML file so he can let flash do the heavy lifting for the client interface. Parsing these files is straight forward. However, this new data that he wants is not in a friendly 1 line format.Data File: linkThis is in a column format (Looks like fortran formatted it). I am considering loading this up into a 2d character array, so as to make getting at the columns a fairly trivial task. If anyone has a better solution(s) I am definitely open to suggestions.Thanks,smc   
  When parsing standardized text "regular expressions" are often a good tool.  Might make it easier to get the numbers into your arrays.Otherwise your solution seems fine.Once parsed, it might make sense to throw that data into a database for easier manipulation at runtime.  That way you have infinite (and standardized [SQL]) options for how you want to grab/manipulate/display the data and whatnot.Also, I know nothing about this, but it may be the case that there are backend interfaces to the NOAA data that supplies it in a more easily manipulated format.-meP.S. so far this summer has sucked ass for waves here in LA =(   ;  This is for a site in the Cocoa Beach through Sebastian Inlet area of Florida. Talk about suck ass waves during the summer. I would prefer to use a database, but that would require a rewrite of my software to some extent (Plus my software does not run on the server). This started out as a simple project. Basically the user creates a XML file that is used as a data specification (admittedly a poor data specification language). It then loads and parsed the sources into this XML file and uploads it to a FTP server. This program was never meant to be a general purpose data transformation utility. I have checked to see if NOAA provides alternate formats, but have not found any others except for HTML. I believe these files come directly from buoys and weather stations. I just wish the developers would have thought about parsing when they decided on this format.In any case I might see what I can come up with using regular expressions. Thanks   ;  The data is pretty regular, so a state-machine approach would probably do the trick.There's the header, a footer, and several repeating station data segments. Break that down accordingly, then break down the station data line-by-line. Everything seems to be delimited by tabs or spaces, and station records are ended with the $$ line at the end.Just take it step-by-step and you will be fine. No need for this 2D array nonsense.I would probably use a std::map<string, std::vector<string> > to hold the parsed data -- that'll make it easy to create and query for values as well as making it very extensible.   