A
A
aldexnotproger2020-05-15 18:30:52
C++ / C#
aldexnotproger, 2020-05-15 18:30:52

How to represent an array to store text?

Hello.
I want to write a text editor in C using the ncurses library. What is the best way to represent an array to store the written text in it, so that I can also navigate through its elements without any problems?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2020-05-16
@aldexnotproger

Well, the first thought that comes to mind is an array of pointers to strings. I don’t know how with memory allocation, it’s easier to look at the source of any open source editor like nano.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question