12/31/2023 0 Comments C using fopen to open any file nameThis is doable, but both awkward and dangerous IMHO. you close the file), you will keep using an invalid pointer reference as a key unless you also remove the file from the map. Second, if for some reason you deallocate the file handle (i.e. fp is a file pointer which points to the type file. If a file is already present on the system, then it is directly opened using this function. If the file is not present on the system, then it is created and then opened. It comes from some memory allocation within the sdtio library, and you have no control over it. fopen is a standard function which is used to open a file. For one thing, the pointer is just like a random number to you. However, it is pretty dangerous to do so. You could use a FILE *, though, since any pointer can be used as a map key. the FILE class does not implement the necessary comparison operator. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |