El archivo no se abre aunque exista [cerrado]

En el siguiente programa, escribe datos con éxito enstudent.txt archivo, pero cuando lo abro e imprimo línea por línea del archivo, siempre muestra el archivo no encontrado.

¿Alguien podría ayudarme con eso?

    ifstream Myfile;


    Myfile.open("student.txt");


      if(!Myfile){
        cout<<"Sorry file can't be opened" <<endl;

        exit(1);
    }


        else
        { 

            // Use loop and read the names and ids from the file and display them 
        string line;
        while (getline(Myfile, line)){

        cout<<line<<endl;
    }

            // Close the file 
      Myfile.close();