This program is so bad my eyes teared up by themselves.
Do not use C-style arrays unless you're interfacing plain C code. It's as simple as that.
If you do though:
1. use proper constants for rows and columns.
Code
void copyFile(double temp[][COLS], int ROWS)
You expect the number of rows as the second parameter, yet you pass the number of columns
Code
copyFile(temp, COLS);
2. Sanitize your input data.
Code
infile >> tempfilerow;
infile >> tempfilecol;
This is most likely the cause of the crash. If you're compiling in pre-C++11 mode, you're not even checking if your code exhibits undefined behaviour when the stream doesn't parse correctly. But more likely, you're simply reading a way bigger number than six and mindlessly use them as upper bound of the loop that's supposed to loop over AN ARRAY OF SIX ITEMS.
3. Use proper types.
Code
double tempfilerow;
double tempfilecol;
Are you expecting to have 6.28 rows? Why are the indexes not integer?