I've got a little problem with pointers and references.
Here the definition of some structure that I use:

Qt Code:
  1. struct PortConfiguration
  2. {
  3. PinConfiguration port0[8]; //!< Configuration of the port 0
  4. PinConfiguration port1[8]; //!< Configuration of the port 1
  5.  
  6. bool valid; //!< Flag: queryPinIOConfiguration() succeeds
  7. };
  8.  
  9. struct PinConfiguration
  10. {
  11. PinUserMode userIO; //!< Specify if a pin can be used by the user or if it used internaly by the module
  12. PinResistorType pullUpDownType; //!< Specify if the input pin use a pull-up or pull-down resistor
  13. PinResistorState pullUpDownState; //!< Specify if the pull-up/pull-down resistor is used or not
  14. PinDigitalIO digitalDir; //!< Specify the direction of a digital pin
  15. PinDigitalLevel outputValue; //!< Specify the digital level of a digital pin
  16. PinDigitalState digitalState; //!< Specify if a pin is a digital or analog pin
  17. };
To copy to clipboard, switch view to plain text mode 

This structures are defined in the class MatrixModule.
Now, in the code of some function I want to create an array of pointers of the 2 ports: port0 and port1, so it will be easy to use in loop.

Qt Code:
  1. void IOPortConfig::setConfig(const MatrixModule::PortConfiguration &config)
  2. {
  3. const MatrixModule::PinConfiguration* ports[2][8];
  4.  
  5. ports[0] = &(config.port0);
  6. ports[1] = &(config.port1);
To copy to clipboard, switch view to plain text mode 

In this way doesn't work:
error: incompatible types in assignment of ‘const MatrixModule::PinConfiguration (*)[8]’ to ‘const MatrixModule::PinConfiguration* [8]’

How should I do?