Comment on Tutorial - const Member Functions in C++ By Emiley J



Comment Added by : z

Comment Added at : 2010-05-09 12:02:17

Comment on Tutorial : const Member Functions in C++ By Emiley J
u said that const function cant change object.can they change a static member of object?
itry that.and it can change it!why?

class c{
static int d;
void f() const {d=0;} //!
}
int c::d;
...
it has no error


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. This example is working fine....I think BillGates
View Tutorial          By: Monoj Rath at 2010-07-15 01:27:51

2. I writing a main class in the eclipse IDE and call
View Tutorial          By: adam lim at 2013-03-11 04:13:51

3. could you send me a code for a music video mobile
View Tutorial          By: Christian at 2009-08-28 23:03:45

4. THANX FOR THE INFO....
View Tutorial          By: Abhinaykumar at 2010-07-06 11:34:53

5. just remember to add
<uses-permission an

View Tutorial          By: Mouad at 2013-07-22 10:47:27

6. M having query
i wat to create employee cla

View Tutorial          By: Dayasagar at 2010-05-22 16:18:17

7. Hi, you put a semicolon after "int main()&quo
View Tutorial          By: noel4037 at 2009-12-28 06:40:17

8. this is the best example of method overriding but
View Tutorial          By: Dipesh at 2009-09-09 12:52:21

9. The example is awesome i found it most useful amon
View Tutorial          By: sabir pasha at 2009-01-20 05:11:34

10. Can you please tell me about parameter and validat
View Tutorial          By: Atul at 2010-09-08 04:48:00