Struct as return type

Hello all,
I am trying to define a function with return type as struct, but seem to be failing.

Error I am receiving is following

.CC error: prototype for 'RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters(double)' does not match any in class 'L1ITMu::MBLTCollection'
 struct RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters( double minRpcPhi ) 
                  ^
In file included from .h error: candidate is: L1ITMu::MBLTCollection::RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters(double)
      struct RpcHOData  getUnassociatedHORpcClusters( double minDist);

Please find the snippet of the code here:

in .h file --->

namespace L1ITMu {
  class MBLTCollection {

  public:

    struct RpcHOData {
      std::vector< L1ITMu::TriggerPrimitiveList> In;
      std::vector< L1ITMu::TriggerPrimitiveList> Out;
      std::vector< L1ITMu::TriggerPrimitiveList> ho;
    };

}

in CC file --->

struct RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters( double minRpcPhi )
{
 .....
 ......
}

Any piece of suggestions would be great.

Thanks in advance,
emily

---------- Post updated at 09:44 AM ---------- Previous update was at 09:40 AM ----------

I forgot to add,
I also tried removing the keyword 'struct' in the return type, did not help either.

in CC file --->

 RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters( double minRpcPhi )
{
 .....
 ......
}

error is then:

.CC error: 'RpcHOData' does not name a type
 RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters( double minRpcPhi ) 

---------- Post updated at 09:58 AM ---------- Previous update was at 09:44 AM ----------

resolved..:slight_smile: :slight_smile:

the issue was the scope in ,cc file

The following in the cc file should do the trick, the struct wasn't defined globally:

L1ITMu::MBLTCollection::RpcHOData L1ITMu::MBLTCollection::getUnassociatedHORpcClusters( double minRpcPhi )