Hi i need to Acess a variable "int Intval" in the below
mentioned code .How to Access it guys i am waiting for your
reply

Answer Posted / vic

Write a getter method?

int val::getVal() {
return intval;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to write a c++ template to check for a function's existence?

580


What is the difference between the parameter to a template and the parameter to a function?

641


Differences between private, protected and public and give examples.

580


Explain data encapsulation?

612


What are the benefits of pointers?

601






Is c++ a pure oop language?

602


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

635


What is polymorphism and its type in c++?

594


What are the classes in c++?

642


Write a recursive program to calculate factorial in c++.

611


What is istream c++?

575


Explain stack unwinding.

642


What flag means?

528


an operation between an integer and real always yeilds a) integer result b) real result c) float result

712


What are the differences between malloc() and calloc()?

615