So, I'm trying to learn C as I'm going to be needing it quite extensively.
Now suppose I have a file containing an arbitrary list of characters
a z y a g y s h e p o................ etc
How do I read this in character by character, and store these in an array without knowing the size?
so basically, everytime i encounter a character, I have to allocate more memory and store it in my char*
I don't want to have a pre-sized buffer of, say, 100....
I know this might not be the best way to do it, but the point is, I need to learn how to create memory like this, on the fly, and attach this memory to my variable (which already has memory that was created dynamically)
Any help would be appreciated!