Posts

Showing posts with the label data

Using a CSV file from C++ program | Flight booking system

Image
Using a CSV file to store data from a C++ program I used objects to store each flight's data in a previous project. This made the program hold the data in the random access memory. This can pose a problem as it is not a permanent way of storing the data and will be erased once the program ends. To counter this, I initially thought of using a database with C++. I sought help with this online and was told about using a CSV file before using a database. A CSV file is a file format that stands for Comma Separated Values. This file can be used to represent rows in the form of lines and column data as values in each line that lie in the same position in their respective line. This way CSV files can be used to represent tabular data. Having said all that, we should look at how we can create a CSV file. Creating a CSV file There are two ways of creating a CSV file. You can either use a text editor such as Notepad in Windows, or you can use a sheets application such as MS Excel in Windows. ...