Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Invalid conversion from int** to const int**
  2. const int** Class::Access() const
  3. {
  4.      return pp_array;
  5. }
  6.        
  7. int const * const * Class::Access() const
  8. {
  9.    return pp_array;
  10. }
  11.        
  12. const int * const * Class::Access() const;
  13.        
  14. const int ci = 0;
  15. const int* pci = &ci;
  16. int* pi;
  17. int** ppi = π
  18. const int** ppci = ppi; // this line is the lynchpin
  19. *ppci = pci;
  20. *pi = 1; // modifies ci!