Hello. I have a C program which does simulation and saves the data into five different data files at each iteration of a while loop. However, when I stopped the program, I noticed that the files have...
Hello. I am trying to understand and modify a complex programs written by others. I found the function which I need to modify and would like to get a list of caller(s) to this function. Given that...
As far as I know, due to the private inheritance relationship mentioned in the previous post, all public members of the base class CListManager become private members of class CGGen. However, CGGen...
There are hundreds of files in the project but as far as I am aware of, there is only one definition of GetNumOfItems in CListManager. Searching the class explorer in Borland Builder C++ also returns...
By the way, what are the advantages of writing the code this way? It seems that the author of the program uses this method to make a pointer (a private member) of one class to point to another class...
Hello. I have a question about the member access operator ->
I am trying to understand a code of this format: A->B->C->D.
Does it means A->(B->(C->D)) or ((A->B)->C)->D)?
In the former case, I...
I used new because when I encountered a bug, somebody suggested that I need to initialize the pointers. So, I thought I could use new to retrieve the...
Thank you for your example. In the sample code, both ptr1 and ptr2 have three elements. The program I try to modify seems to read data from several data files. It seems that the previous programmers...
I have two pointers pointing to two different double vectors. Could anybody please let me know the proper way of assigning an element from a vector to the other? Here is a sample code. Please note...
I want to share variables/functions between classes. The classes are defined in different .h files. I read that the friend function allows us to do that but I keep getting error messages saying...