    #include <iostream>
    #include <fstream>
    #include <vector>
    #include <iomanip>
    #include <cstdint>

    struct Person {
        unsigned int id;
        std::string name;
        uint8_t age;
        // ...
    };

    struct delim_field_extractor_proxy;

    struct delim_field_extractor_proxy {
        delim_field_extractor_proxy(std::string& field_ref, char delim = '"')
        : field_ref_(field_ref), delim_(delim) {}

        friend
        std::istream& operator>>(std::istream& is, const delim_field_extractor_proxy& extractor_proxy);

    	void extract_value(std::istream& is) const {
    		field_ref_.clear();
    		char input;
            bool addChars = false;
            while(is) {
                is.get(input);
                if(is.eof()) {
                    break;
                }
                if(input == delim_) {
                    addChars = !addChars;
                    if(!addChars) {
                        break;
                    }
                    else {
                    	continue;
                    }
                }
                if(addChars) {
    			    field_ref_ += input;
                }
    		}
    		// consume whitespaces
    		while(std::isspace(is.peek())) {
    			is.get();
    		}
    	}
    	std::string& field_ref_;
    	char delim_;
    };


    std::istream& operator>>(std::istream& is, const delim_field_extractor_proxy& extractor_proxy) {
    	extractor_proxy.extract_value(is);
    	return is;
    }


    int main(int argc, char** argv) {
    	std::ifstream inputFile;
        bool useInputFile = false;
        if(argc > 1) {
        	inputFile.open(argv[1]);
        	useInputFile = true;
        }
        std::istream& ifs = useInputFile ? inputFile :
        		                           std::cin; // Open file alternatively
        std::vector<Person> persons;

        Person actRecord;
        int act_age;
        while(ifs >> actRecord.id
                  >> delim_field_extractor_proxy(actRecord.name,'\t')
                  >> act_age) {
        	actRecord.age = uint8_t(act_age);
            persons.push_back(actRecord);
        }

        for(auto it = persons.begin();
            it != persons.end();
            ++it) {
        	std::cout << it->id << ", " << it->name << ", " << int(it->age) << std::endl;
        }
        return 0;
    }
