How do you initialize a class member,
class x {
const int i;
};
Answer Posted / santosh patil
class members can be initialized directly like
class x{const int i=10;}
but its structures members tat cant be initialized lik above
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is wrapper class in c++?
What is do..while loops structure?
What is c++ and its features?
Can we overload operator in c++?
What's the most powerful programming language?
What is algorithm in c++ programming?
How do you declare A pointer to a function which receives nothing and returns nothing
Which operations are permitted on pointers?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include What is meant by entry controlled loop? What is static in c++? Tell me an example where stacks are useful? Which is best ide for c++? What is a local variable? Can a built-in function be recursive?