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

Does c++ have string data type?

686


How do you add an element to a set in c++?

547


Is there a sort function in c++?

543


Is c++ the best programming language?

528


What is a sequence in c++?

570






Differentiate between C and C++.

703


Which bit wise operator is suitable for turning off a particular bit in a number?

636


Are there any special rules about inlining?

577


Describe the advantages of operator overloading?

569


Why is main an int?

522


Which bitwise operator is used to check whether a particular bit is on or off?

585


Using a smart pointer can we iterate through a container?

554


What is ios :: in in c++?

627


How many types of comments are there in c++?

570


What is a block in c++?

542