Click here to Skip to main content
15,908,015 members

Comments by bobos_underground (Top 4 by date)

bobos_underground 18-Dec-14 19:07pm View    
But its normal to write chars in the binary file so that are readable to an text editor ?
bobos_underground 18-Dec-14 19:01pm View    
Thank you.
bobos_underground 18-Dec-14 17:57pm View    
After I close the file I open it again with ios::in; And also seekg is irelevant;
bobos_underground 7-Dec-14 3:38am View    
I read tutorials for the pointer and I know that struct has pointers that may adress or not some variable in the memory.
What I dont understand how the pointer size and space(as the size of the pointer in the memory) is managed on the memory. For example char *username beiong a char pointer is something phisical in the memory before pointing to something it must be held somewhere.

My question was: If I write a pointer that leads to no portion of memory to a file that file will contain a portion of data that is the pointer itself ? (not the data that it links)?

If the struct contains two pointers that will lead nowhere in the memory and I write the struct to file will the file contain the pointers since pointers are also spaces in memory ?

If I assign some chars to the 2 pointers from the struct when I write the struct to file the pointer data in the memory will not be taken in consideration and only what the pointers are pointed to ?