I concluded that, readAll() reads every thing in the file. same goes for read(). But what is meant by "Reads at most maxlen characters from the stream".
for example i have saved the comments of some people in a file directly from the program i made. Each user before commenting is bound to type a special character at the start of comment. Now i want to load all the comments one by one in a Qlabel from that file. How can i recognise that the special character in the file has reached so that i can print the next Comment on another Qlabel.
If you give it a maxlen value, that's all it will read.
If you set the parameter to 10, it will read 10 characters from the stream.
Since it sounds like the amount of data the user can type is of variable length and that you recognize the next comment by a special character, I suggest you readAll() and then parse the QString (if it's not too much data).
If the amount you're trying to read is too much, you would need to read() the data based on the amount you can process at any time and parse that data based on the location of the special character. Any incomplete comment records would need to be joined totether.
so it means any kind of list i use, its iterator will return the pointer of the nodes of the list..
Not really. It means that iterators in C++, at least the ones following convention, are an abstraction of pointers. They overload operators in such a way that they have a subset of pointer operations depending on the type of iterator. All iterators have a dereference operator to access the "pointed to" object.
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...