subject

Define a class called Text whose objects store lists of words. The class Text will be just like the class StringVar except that the class Text will use a dynamic array with base type StringVar rather than base type char and will mark the end of the array with a StringVar object consisting of a single blank, rather than using '\0' as the end marker. Intuitively, an object of the class Text represents some text consisting of words separated by blanks. Enforce the restriction that the array elements of type StringVar contain no blanks (except for the end marker elements of type StringVar). Your class Text will have member functions corresponding to all the member functions of StringVar. The constructor with an argument of type const char a[] will initialize the Text object in the same way as described below for inputLine. If the C-string argument contains the new-line symbol '\n', that is considered an error and ends the program with an error message. The member function inputLine will read blank separated strings and store each string in one element of the dynamic array with base type StringVar. Multiple blank spaces are treated the same as a single blank space. When outputting an object of the class Text, insert one blank between each value of type StringVar. You may either assume that no tab symbols are used or you can treat the tab symbols the same as a blank; if this is a class assignment, ask your instructor how you should treat the tab symbol

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, ghazanfarwaheed7967
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
image
Computers and Technology, 22.06.2019 15:10, AleciaCassidy
Consider a direct-mapped cache with 216 words in main memory. the cache has 16 blocks of 8 words each. it is a word-addressable computer (rather than a byte-addressable computer which we normally discuss). (a) how many blocks of main memory are there? (b) what is the format of a memory address as seen by the cache, that is, what are the sizes of the tag, cache block, and block offset fields (if they apply)? (c) to which cache block will the memory reference db6316 map?
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, Dweath50
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, kyleemarie2003
Companies that implement and apply an information system effectively can create
Answers: 1
You know the right answer?
Define a class called Text whose objects store lists of words. The class Text will be just like the...

Questions in other subjects:

Konu
Mathematics, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
English, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
Biology, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01
Konu
Mathematics, 11.09.2020 02:01