Click here to Skip to main content
15,891,843 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Does anyone have an algorithm of printing strings in a screen, that does the paging (scroll up and down) cuts the word if it doesn't fit in the screen in that paragraph and so on?
Posted
Comments
Sandeep Mewara 11-May-11 6:30am    
Tried to write your own? :)
Richard MacCutchan 11-May-11 9:00am    
What do you mean by screen, a console screen or a Windows view? Try and be a bit more specific about your problem.

I made something similar years ago... it was a college assignment...

Arrays are the answer...

you will have to create a small parser:

read the word (find a space, comma or anything that is not a letter) count the chars found till the last time, check how many chars are left in the line you are.. .decide what to do and show it...

You should start showing the text from one position... this position should be one array index... that index should change depending on the "page" you want to see...

HTH...
 
Share this answer
 
Yeah I wrote the code myself. And it is ok. I was just asking if anyone knew something similar so I can check out. but anyay. Its up and running now.

thanks
 
Share this answer
 
Comments
Joan M 16-May-11 10:56am    
Nice to know that it is already working...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900