I'm new to C programming, and I'm trying to figure out a simple way to read the entire contents of a text file. Is there a way? I have a SQL file that has a lot of SQL code in it that I want to send to MySQL from my C program, but I don't know how to read the entire file.
I guess I read it into a char[] array, but how? I've been looking it up on Google and I even have a book on programming in C, but I'm still confused.
Thanks ahead of time,
Alex.