Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 105833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:30:05+00:00 2026-05-11T01:30:05+00:00

Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I

  • 0

Pretty self-explanatory, I tried google and got a lot of the dreaded expertsexchange, I searched here as well to no avail. An online tutorial or example would be best. Thanks guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T01:30:06+00:00Added an answer on May 11, 2026 at 1:30 am

    If what you’re really doing is manipulating a CSV file itself, Nelson’s answer makes sense. However, my suspicion is that the CSV is simply an artifact of the problem you’re solving. In C++, that probably means you have something like this as your data model:

    struct Customer {     int id;     std::string first_name;     std::string last_name;     struct {         std::string street;         std::string unit;     } address;     char state[2];     int zip; }; 

    Thus, when you’re working with a collection of data, it makes sense to have std::vector<Customer> or std::set<Customer>.

    With that in mind, think of your CSV handling as two operations:

    // if you wanted to go nuts, you could use a forward iterator concept for both of these class CSVReader { public:     CSVReader(const std::string &inputFile);     bool hasNextLine();     void readNextLine(std::vector<std::string> &fields); private:     /* secrets */ }; class CSVWriter { public:     CSVWriter(const std::string &outputFile);     void writeNextLine(const std::vector<std::string> &fields); private:     /* more secrets */ }; void readCustomers(CSVReader &reader, std::vector<Customer> &customers); void writeCustomers(CSVWriter &writer, const std::vector<Customer> &customers); 

    Read and write a single row at a time, rather than keeping a complete in-memory representation of the file itself. There are a few obvious benefits:

    1. Your data is represented in a form that makes sense for your problem (customers), rather than the current solution (CSV files).
    2. You can trivially add adapters for other data formats, such as bulk SQL import/export, Excel/OO spreadsheet files, or even an HTML <table> rendering.
    3. Your memory footprint is likely to be smaller (depends on relative sizeof(Customer) vs. the number of bytes in a single row).
    4. CSVReader and CSVWriter can be reused as the basis for an in-memory model (such as Nelson’s) without loss of performance or functionality. The converse is not true.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 51k
  • Answers 51k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You can try this: NSLog(@'%@', NSStringFromCGPoint(cgPoint)); There are a number… May 11, 2026 at 6:34 am
  • added an answer google docs would be a save bet. it allows for… May 11, 2026 at 6:34 am
  • added an answer So, in .NET what you're asking for is theoretically possible,… May 11, 2026 at 6:34 am

Top Members

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.