Archived
This forum has been archived. Please start a new discussion on GitHub.
problems of sequence?
mrliuhua
in Help Center
my ice file is defined as below, but when compiling, there are errors, why?
thks!
// **********************************************************************
//
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef COMMON_M
#define COMMON_M
module Common
{
class CFuncMenu
{
string funcID;
string levelID;
string levelName;
string parentID;
string instanceName;
sequence<CFuncMenu> funcChildren;
};
};
#endif
thks!
// **********************************************************************
//
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#ifndef COMMON_M
#define COMMON_M
module Common
{
class CFuncMenu
{
string funcID;
string levelID;
string levelName;
string parentID;
string instanceName;
sequence<CFuncMenu> funcChildren;
};
};
#endif
0
Comments
-
Sorry, you need to forward declare the CFuncMenu class for this to work. The following should work instead:
// Slice module Common { class CFuncMenu; sequence<CFuncMenu> CFuncMenuSeq; class CFuncMenu { string funcID; string levelID; string levelName; string parentID; string instanceName; CFuncMenuSeq funcChildren; }; };0
