hey guys,
i'm currently making a virtual machine in c for a community project, no one else is willing to make one. i would have done it in C# which is my normal language, but part of the project said that it couldn't be reliant on any framwork or libraries. so we all decided that the virtual machine would be made in c and i was the person hat volunteered to make it.
so i got to work as quickly as possible learning how to program in c and then making my virtual machine. it's coming along nicely, except there's one major part of the virtual machine that i don't know how to do, how to read text from a file and then put it into an array.
so what i want to find out is how to read the contents of a file and then put it into an array. the array that i have to put the code in is called 'program'.
and when the contents is loaded into the array, is it possible to split it up at every newline or at every ' ' character? that would help a lot.
thanks for all your help,
Fletcher