Hello again Grumbler,
There are several different methods you could use.
If you are using MFC the simplest would probably be to use a CStringArray
object. There are many other MFC collection templates and classes to choose
from.
If you want to stay away from MFC, for whatever reason, the STL vector
template would work well. There are other STL collection templates as well.
You could even allocate your own array elements and manage the memory. Not
usually done these days.
Hope this helps.
Pete Albano
Vice President Software Engineering, Kostech Corp.
http://informedinvestor.com
Quote:
>Hi,
>I just figure it out how to read file line by line,
>I would like to know how do I store that value into dynamic CString or
char*
>array.
>Could anyone tell me how to declare dynamic array?
>I read value like this.
>ifstream fInput( "text.txt" );
>if ( fInput.is_open() )
>do
>{
> //....
> fInput.getLine( temp, 255 );
> //... I need to store temp value into dynamic array!!!!
>}while ( !fInput.eof() )
>Thanks in advance.
>Peter,