In: Computer Science
Code a simple Editor class with 2 constructors (one default, one with a string for a file name)
The Editor class in private has an instance of a LinkedList (of strings) and the position of the user (use our Point class)
create a short file - at least 5 lines - could be a program
main:
string fileName("input.txt");
Editor miniVi (fileName);
miniVi.displayLines();
C++ explain in detail plz Thank you
Here is the answer for your question in C++ Programming Language.
Kindly upvote if you find the answer helpful.
NOTE : I have used STL LinkedList to use as linked list, as it is not mentioned to create a linked list class. Please comment below if you have any doubts.
#########################################################################
CODE :
#include<iostream> //Create a class names "Editor" |
############################################################
input.txt
#include<iostream> using namespace std; int main(){ return 0; } |
#####################################################################
SCREENSHOTS :
Please see the screenshots of the code below for the indentations of the code.
##########################################
input.txt
##########################################################################
OUTPUT :
Any doubts regarding this can be explained with pleasure :)