After being told using scanf and printf instead of cout and cin
because they are treated like a function instead like cout and cin being treated as a object thus equaling faster code generation so I am relearning as a i go
Can you not use a string in printf or scanf instead use chars?
also If i have this code
#include <fstream>
#include <string>
using namespace std;
const int ROWS = 5, COLS = 5;
int main()
{
int matrix[ROWS][COLS], i, j;
char str[100];
ifstream inFile;
printf("Enter the name of the input file:");
scanf("%s", &str);
return 0;
}
How do i open the file?