Can anyone please tell me how to store contents of a text file after reading it into a 1D array buffer and then accessing each separate element of the paragraph? Please help

>>Can anyone please tell me how to store contents of a text file after reading it into a 1D array buffer

char buf[1024];
// not read the file into the above array

>>and then accessing each separate element of the paragraph
C++ knows nothing about paragraphs -- only lines that are terminated by '\n' character. If you want to recognize paragraphcs then you will have to devise your own algorithm to do that.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.