Commits

George Russell committed 0beaa78

Ptr test

Comments (0)

Files changed (1)

ConstCPPTests/examples.cpp

     return 0;
 }
 
+int f6() {
+  int a = 111;
+  mutable int b = 222;
+
+  mutable int * mutable mptr2mint = &b;
+  mptr2mint = &b;
+  *mptr2mint = 101;
+  int * mutable mptr2int = &a;
+  mptr2int = &a;
+  //*ptr2mint = 212;
+  
+  int * ptr2int = &b;
+  //ptr2int = &b;
+  //*ptr2int = 1234;
+  return 0;
+}
+
 int main(int argc, char** argv) {
     if (!(f() == 2 )) return 1;
     if (!(f2() == 2 )) return 1;
     if (!(f3() == 1 )) return 1;
     if (!(f4() == 0 )) return 1;
     if (!(f5() == 1 )) return 1;
-    
+ 
+
     
 }