Hi All,
I want to write a generic function which takes in a void pointer and length as input and writes the data referenced by the pointer to a file.
Another generic function which takes in a void pointer, length and offset and reads back the data to the memory referenced by the void pointer from the file.
Is it possible in C?
As fprintf needs the datatype to be specified, how can I achieve doing this? Is there any work around?
Thanks a lot for your time.
raghavendra83 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
raghavendra83 0 Newbie Poster
raghavendra83 0 Newbie Poster
Murtan 317 Practically a Master Poster
raghavendra83 0 Newbie Poster
Murtan 317 Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.