Guys, is it possible in c ++ to get a pointer to an element from a file?

More specifically, my task is to fill in the multi-display with elements taken from a file. So, is it possible to directly and directly take, even if by character?

  • one
    Well, another question is how sideways it relates to C ++. And so man mmap , if the system complies with the standards (posix). Although about C ++, I may have got excited. Check out boost.org/doc/libs/1_39_0/libs/iostreams/doc/classes/… - alexlz
  • The pointer points to an element in memory, so without loading the file into memory in one way or another - no way. - VladD

1 answer 1

the task is to fill the multi-display with elements taken from the file.

Alexandrescu in Modern Design on C ++ deals with a very similar task as an example in the chapter on object factories. Look, most likely you will find what you need.