What is pure virtual function?
Question: Can you explain and give me examples of pure virtual function? What is the difference between pure virtual function and virtual function? Answer: A pure virtual function is a
Question: Can you explain and give me examples of pure virtual function? What is the difference between pure virtual function and virtual function? Answer: A pure virtual function is a
Question: How do you clear a character array? Answer: You can use the standard C library memset function. Here is an example:void foo (){ char t [20]; cin >> t;
Question: I have been doing some programming in C++ and recently decided I would try some Windows programming with the Microsoft Foundation Classes. This isn’t a question about Windows but
Question: Can I use strstream functions for incode I/O,i.e. writing to memory just as if it were binaryinput/output to a file? Answer: You can use it to do incode input
Question: Which arguments do you receive when you overload . and -> , and what do you do with the arguments? I know that for overloading [] you receive the
Question: What is the proper way to dynamically allocate a 2D array using the new operator?Here’s a code fragment:int num = 50;int **stuff;stuff = new int[num][num];My compiler (g++) returns the
Question: Which model of C/C++ compiler offers the best value for a beginning programmer?(It must be ANSI C compatible.) Answer: The GNU G++ compiler. It’s free, ANSI C compatible and
Question: In C, I use the FILE *filename. As a beginning C++ programmer, I open streams for reading and writing inside the main() function, but when I try to work
Question: Suppose I’ve got the following class hierarchies:Surface_PlotContourSurface_Plot, child of Surface_PlotSurface_DataGridSurface_Data, child of Surface_DataSurface_Plot contains a Surface_Data object, ContourSurface_Plot contains a GridSurface_Data object.What is the most elegant way to arrange