7 March, 2013

Actually there was a problem in program.
In src sub-folder, .cpp files and txt files for header and footer was there .
But in .cpp file, the code for reading the the header file and write to output file is not working.

Then after debugging i got error is that the file in which we have to write was open but from where to read that is header file was not opening for reading.

I was executing the program from testing folder through makefile.
I thought that these .cpp files and .txt files are in same folder so there is no need to mention the path.

But i was wrong. When i specify the path, code is working.
It is opening the files for reading.

Also learn about various flags for opening a file.

Input/Output with Files


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s