can anyone tell me if its possible to add more then one item to a single list field to a TListBox

Say you have a text file, and the file stores records in the format:

Name Barcode Price Quantity

Im tryinga to load that data to a list box into a single field using pointers thats in the same format, instead im getting:

Name
barcode
Price
Quantity

Heres the code:

if(OpenDialog1->Execute())
	{
		ifstream OPEN;
		OPEN.open(OpenDialog1->FileName.c_str());
		OPEN >> SPointer->BarCodeField >>
				SPointer->ProductNameField >> //etc etc
		OPEN.close();

		Stock ->Items->Add(SPointer ->BarCodeField);
                Stock ->Items->Add(SPointer ->ProductNameField);
                //more items here
        }

Im stuck on the exact same thing!! :(

I have ZERO idea as to how to add more than one product (plus its details) into the array ....

Any help anyone???

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.