








Type casting
Question: I’ve read the following example about type casting: int i; float f; f=float(i);Can you explain what happens to variables f and i on line 3, and could you give
Question: I’ve read the following example about type casting: int i; float f; f=float(i);Can you explain what happens to variables f and i on line 3, and could you give
Question: How does one overload operator->*()? Answer: Here is an example:struct bar { void doSomething();}struct foo { bar *operator ->* () { return bar_; }}void Foo (){ void (bar::*barFn)() =
Question: I have a completed program coded as a bubble sort. I must now read and write to a file. I am using fstream.h and coding an input for the
Question: I recently learned that the C++ draft standard requires that an implementation not perform any static checking on a function’s exception specification (aside from inherited virtual functions and function
Question: I have a Delphi app that displays a bitmap, and I control drawing on the canvas object as one might on a paper roadmap. This works fine. When I
Question: Can I overload the >> operator in a class for all integral types using a template? If so, how? Answer: The short answer is no.The long answer?Templates are mechanisms
Question: What is the purpose of placing a const at the beginning and end of a function declaration with a de-reference to the function? Are there memory leak implications?For example:
Question: I am trying to truncate and then convert a float to a string. Something like atoi().Is this possible? Any suggestions? Answer: float f = 1.234;int i = f;strstream s;s