|
|
View Full Version : line editor in c++
cateyes007 03-27-03, 12:20 PM pls help!
i need to design and implement a primitive line editor in c++;my editor should allow the user to input text by providing the following basic operations:
- insert line
- delete line
- overwrite line
- number of characters should be constant thoughout document
- each line of text must be stored internally as a LINKED LIST
FUNCTION LIST
copy
clear
find(a word)
change case
word and line count
tables
paragraph indent
Justification(Left , Right, Center)
Spell Checker(for subset of simple words)
- editor should provide comprehensive error checking and validation as well as a help system describing my eitor's functions.
THANK U...i need HELP!.
Jagat chand yadav 03-29-03, 04:39 AM Pleas try to do it yuur self
look, its not that hard
each linked list element should be an array of characters, cos the document is a fixed length, i'd say make each array 80 characters long..
once you got that.. its easy to insert a line, just insert it into the linked list
its easy to del a line, just del it fromt he linekd list
its easy to overwrite a line, just replace the list emlemnt, or the array it points to
if you cant do these, you need to read up your linked list notes again
-
once you get that the other functions are easy
stuff life justify in the centre:
count the line length, subtract it from 80, to find out how much slack space you got, divide the result by 2, nd insert that many spaces at the start of the line. its now centered
justify fully? count the number of spaces, find the slack space, divide the slack space by the number of spaces. you now know how many spaces to make each single space into, to full justify the line
cmon man.. its not hard, just think about it more and dont get us to do it fr you.
like, hitchhikers, i dont give the lazy tards a lift if they are just standing there. but if they are making an effort to walk to wherver, with their thumb out.. i stop every time i see em
cateyes007 04-02-03, 08:09 AM thank you.....
would i get your help/critique if i post the code for the project?
cateyes007 04-02-03, 08:15 AM Originally posted by cjard
look, its not that hard
each linked list element should be an array of characters, cos the document is a fixed length, i'd say make each array 80 characters long..
once you got that.. its easy to insert a line, just insert it into the linked list
its easy to del a line, just del it fromt he linekd list
its easy to overwrite a line, just replace the list emlemnt, or the array it points to
if you cant do these, you need to read up your linked list notes again
-
once you get that the other functions are easy
stuff life justify in the centre:
count the line length, subtract it from 80, to find out how much slack space you got, divide the result by 2, nd insert that many spaces at the start of the line. its now centered
justify fully? count the number of spaces, find the slack space, divide the slack space by the number of spaces. you now know how many spaces to make each single space into, to full justify the line
cmon man.. its not hard, just think about it more and dont get us to do it fr you.
like, hitchhikers, i dont give the lazy tards a lift if they are just standing there. but if they are making an effort to walk to wherver, with their thumb out.. i stop every time i see em
thank you.....
would i get your help/critique if i post the code for the project?
Yes. Always post your own attempt before asking someone else to do it for you.
-AntonK
Or at least if you want us to do it, offer cash!!! :D :D :D
well, you can post it for critique, but i cant guarantee to help; i'm an object oriented programmer, and i was taught using java as a medium, so i only really know java syntax. i can only check your program for algorithmicic correctness as according to object oriented paradigms, not syntactical correctness as according to a c++ manual.. and further, my checking ability is limited by my ability to read c++ code, which might be insufficient :)
|