I have written a simple application that reads a data file, parses the text and then does some processing on that data. The data file is opened in my main() function. Is it good
It depends on where that exit(1) comes from. You should not call this exit(1) from a library, only from you own application.
exit(1)
If you need to set an error code, you may set an errno (the STD C variable, yes).
errno
If you want to try a more C++ way, you can throw an exception, with a detailed error code.