reading vectors values of type static from file
-
hii... i'd like to ask if someone know how can i read 3 DIM vectors valuse of (static type) from file(any external file on any drive of PC) using C++.. my application is programmed by C++ with OpenGL. regards miss maria
-
hii... i'd like to ask if someone know how can i read 3 DIM vectors valuse of (static type) from file(any external file on any drive of PC) using C++.. my application is programmed by C++ with OpenGL. regards miss maria
Miss_ Petrovna wrote:
how can i read 3 DIM vectors valuse of (static type) from file
how are the vectors defined... generally I have a vector < some3dstructure > storage. and then I simply read into some3dstructure and then push_back(some3dstructure) into the vector. This makes it real easy to read/write binary data. Text data is not really a little more difficult, but rather just a few more steps to keep track of and get right. -- modified at 18:22 Monday 23rd July, 2007
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Miss_ Petrovna wrote:
how can i read 3 DIM vectors valuse of (static type) from file
how are the vectors defined... generally I have a vector < some3dstructure > storage. and then I simply read into some3dstructure and then push_back(some3dstructure) into the vector. This makes it real easy to read/write binary data. Text data is not really a little more difficult, but rather just a few more steps to keep track of and get right. -- modified at 18:22 Monday 23rd July, 2007
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
Thankx El Corazon for Ur perfect opinion. i was looking for efficient way to read static info. from a file for program generality instead of reading binary data directly (this what i did in my program).Ur opinion is very nice from phelosophical view too :) . regards maria -- modified at 5:51 Friday 27th July, 2007
-
Thankx El Corazon for Ur perfect opinion. i was looking for efficient way to read static info. from a file for program generality instead of reading binary data directly (this what i did in my program).Ur opinion is very nice from phelosophical view too :) . regards maria -- modified at 5:51 Friday 27th July, 2007
Miss_ Petrovna wrote:
i was looking for efficient way to read static info. from a file for program generality instead of reading binary data directly
they are not that much different. A routine for processing the vector information can in its simplest form be binary read/write. With minor changes you can use routines to provide an interface to/from the binary form to XML, or other text formats, or any format for that matter. They all have generally the same inforamtion, they simply put it in different forms or locations within the file.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
-
Miss_ Petrovna wrote:
i was looking for efficient way to read static info. from a file for program generality instead of reading binary data directly
they are not that much different. A routine for processing the vector information can in its simplest form be binary read/write. With minor changes you can use routines to provide an interface to/from the binary form to XML, or other text formats, or any format for that matter. They all have generally the same inforamtion, they simply put it in different forms or locations within the file.
_________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
thank U again El Corazon for UR rich information about my question.. frankly, i'll avoid the complexity and errors which may be accured when data r read from file. both of UR opinions are satisfactory and perfect.. I have built my program upon UR first opinion, i'll keep UR second perfect suggestion for future work :). regards maria -- modified at 14:42 Sunday 29th July, 2007