vanbasten12
19-12-2005, 10:57 PM
يا شباب ساعدوني في هذا البرنامج...
[Text editor in C++ language
The program should have the following commands:
e filename (edits the file called filename if it exists. If it doesn't
exist,then you will be creating a new file)
i (insert mode) insert any number of lines aftr current line.
ctrl-v (stop inserting data)
l (list the entire file without line numbers)
n (list the entire file with line numbers)
d n (delete line number n)
c (count the number of lines in the file)
s (save the file opened with the e command)
p (print the file)
q (quit the program prompting for save if the file hasn't been saved)
Example of the program:
> e test.cpp
> i
#include <iostream>
using namespace std;
void main ()
{
cout << "test" << endl;
}
^v
> n
1) #include <iostream>
2) using namespace std;
3) void main ()
4) {
5) cout << "test" << endl;
6) }
> c
test.cpp has 6 lines
> s
saved test.cpp
> p
printing test.cpp
> q
[
[Text editor in C++ language
The program should have the following commands:
e filename (edits the file called filename if it exists. If it doesn't
exist,then you will be creating a new file)
i (insert mode) insert any number of lines aftr current line.
ctrl-v (stop inserting data)
l (list the entire file without line numbers)
n (list the entire file with line numbers)
d n (delete line number n)
c (count the number of lines in the file)
s (save the file opened with the e command)
p (print the file)
q (quit the program prompting for save if the file hasn't been saved)
Example of the program:
> e test.cpp
> i
#include <iostream>
using namespace std;
void main ()
{
cout << "test" << endl;
}
^v
> n
1) #include <iostream>
2) using namespace std;
3) void main ()
4) {
5) cout << "test" << endl;
6) }
> c
test.cpp has 6 lines
> s
saved test.cpp
> p
printing test.cpp
> q
[