WSQ09- Multipart Data and files

Hey there!, basically this code shows you whatever you wrote in a text file, it shows you line  by line the words of a text file.

First I added the fstream library, this allows you to read a .txt file. After that, I wanted the program to ask the user what song would he/she wants to see. The user has to type the name of the song in a string value, the if function reads the name of the song and finally, it sees the which file name is it and it opens the text.

The teacher told us to make a function, but this code Works the same way without a function needed.

Just look at the operations I made and how you open the file.

CODE:

aaa

Result:


Leave a comment