How do you initialize a class member,
class x {
const int i;
};
Answer Posted / guest
x()
{i=10;
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Write a function that swaps the values of two integers, using int* as the argument type?
Define 'std'.
What is a class template in c++?
why and when we can declar member fuction as a private in the class?
What is meant by the term name mangling in c++?
How can we read/write Structures from/to data files?
Does c++ have foreach?
What is an operator function? Describe the function of an operator function?
Is empty stack c++?
What is fixed in c++?
Explain virtual destructor?
Am studying basic c++ programming, have been given the following assignment. Design a linear program to calculate the maximum stress a material can withstand given a force and a diameter of a circle. To find the required area pi should be defined. Have most of the program sorted out but am at a loss as to how to show the calculations required. Can anyone help?
What are the five basic elements of a c++ program?
Explain the different access specifiers for the class member in c++.
the first character in the variable name must be an a) special symbol b) number c) alphabet