Help me in solving CPPFALL338 problem

My issue

See contents of the file
In the previous problem - we saw that the directory has certain files.

Let us now see the contents of our file - input.txt using the following command

system(“cat /mnt/codechef/input.txt”)
Try out this code in the IDE.

My code



#include <iostream>
#include <fstream>
using namespace std;

void userFunction() {
    /* Show file */
    system("ls -l /mnt/codechef");

    /* Read contents of input.txt */
    system("cat /mnt/codechef/input.txt");
}


Learning course: Learn Programming and Problem Solving using C++
Problem Link: https://www.codechef.com/learn/course/sit-cpp-fall/SITFALL52/problems/CPPFALL338