I'm having a little trouble with my code. I've created the following function:
int main (int argc, char *argv[]). I use this along with an ifstream to pull characters from a file and store them in an array.
My question is how many functions total should I have to pull this off? Should they all be in one function? should the ifstream and array be in another?
I tried to send file.get(x) to another function to run a loop to place all the characters in an array but it isn't working. Any tips?
I don't think I'm quite understanding your situation, but having it all in one function should be fine. Unless its like, 500 lines of code you're using to retrieve text from a file, there's no big reason to put it in a separate function. However, i've always been taught it's good practice to make as much functions as possible. But it won't kill your program with it all inside your main function.