C 函数指针 和 Obj-C的block

本文详细介绍了C语言中函数指针的基本用法,包括定义函数指针类型、函数指针变量定义、作为函数参数传递、函数指针的指针使用、函数指针数组以及函数指针的大小等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

C函数指针的用法

------------------------------------------------------------------------------------------------

函数指针通常用来实现回调,其基本用法如下:

1、定义函数指针类型

// 定义一个原型为int Fun( int a );的函数指针

typedef int (*PTRFUN) ( int aPara );

2、函数指针变量的定义

PTRFUN pFun;    // pFun 为函数指针变量名

int (*pFun2) ( int a );   // pFun2也是函数指针变量名

3、函数指针作为函数的参数传递

// 定义回调函数

int CallBack( int a ){

    return ++a;

}

// 定义回调者函数

void Caller( PTRFUN cb )

// void Caller( int (*cb) ( int ) ) // 也可这样申明

{

    int nPara = 1;

    int nRet = cb( nPara );

}

// 使用回调

void Test(){

    Caller( CallBack ); // 直接使用回调函数

    PTRFUN cb = CallBack; // int (*cb) ( int ); cb = CallBack;

    int nRet1 = cb( 99 ); // nRet1 = 100;

}

4、函数指针的指针使用

// 定义函数指针的指针

typedef int (**PTRPTRFUN) ( int aPara );

// 函数指针的指针作为参数

void PtrCaller( PTRPTRFUN cb )

// void PtrCaller( PTRFUN* cb )           // 指针申明

// void PtrCaller( int (**cb) ( int ) ) // 原型申明

{

    int nRet = (*cb)(999); // nRet = 1000;

}


// 使用函数指针的指针

void Test(){

    PTRFUN cb = CallBack;

    PtrCaller( &cb );

}

5、函数指针数组的使用

// 函数指针数组的定义

PTRFUN fArray[10];

// int (*fArray[10]) ( int );   // 原型定义

for ( int i = 0; i < 10; i++ ){

    fArray[i] = CallBack;

    int nRet = fArray[i](i);    // nRet = i+1;

}

6、函数指针的大小

// 既然叫指针,所以跟普通的指针一样在32位系统下大小都为4

int nSz1 = sizeof(PTRFUN);      // nSz1 = 4;

int nSz2 = sizeof(PTRPTRFUN);   // nSz2 = 4;

注意:

        编译器存在多种种调用规范,如在Visual C++中,可以在函数类型前加_cdecl,_stdcall或者_pascal来表示其调用规范(默认为_cdecl)。调用规范影响编译器产生的给定函数名,参数传递的顺序(从右到左或从左到右),堆栈清理责任(调用者或者被调用者)以及参数传递机制(堆栈,CPU寄存器等)。

------------------------------------------------------------------------------------------------

函数指针与typedef
关于C++中函数指针的使用(包含对typedef用法的讨论) 
(一)简单的函数指针的应用。
//形式1:返回类型(*函数名)(参数表) 
char (*pFun)(int); 
char glFun(int a){ return;} 
void main() 

      pFun = glFun; 
      (*pFun)(2); 

        第一行定义了一个指针变量pFun。首先我们根据前面提到的“形式1”认识到它是一个指向某种函数的指针,这种函数参数是一个int型,返回值是char类型。只有第一句我们还无法使用这个指针,因为我们还未对它进行赋值。
        第二行定义了一个函数glFun()。该函数正好是一个以int为参数返回char的函数。我们要从指针的层次上理解函数——函数的函数名实际上就是一个指针,函数名指向该函数的代码在内存中的首地址。
        然后就是可爱的main()函数了,它的第一句您应该看得懂了——它将函数glFun的地址赋值给变量pFun。main()函数的第二句中“*pFun”显然是取pFun所指向地址的内容,当然也就是取出了函数glFun()的内容,然后给定参数为2。
(二)使用typedef更直观更方便。 
//形式2:typedef 返回类型(*新类型)(参数表)
typedef char (*PTRFUN)(int); 
PTRFUN pFun; 
char glFun(int a){ return;} 
void main() 

      pFun = glFun; 
      (*pFun)(2); 

          typedef的功能是定义新的类型。第一句就是定义了一种PTRFUN的类型,并定义这种类型为指向某种函数的指针,这种函数以一个int为参数并返回char类型。后面就可以像使用int,char一样使用PTRFUN了。
        第二行的代码便使用这个新类型定义了变量pFun,此时就可以像使用形式1一样使用这个变量了。
(三)在C++类中使用函数指针。 
//形式3:typedef 返回类型(类名::*新类型)(参数表) 
class CA
{
public: 
      char lcFun(int a){ return; } 
}; 
CA ca;
typedef char (CA::*PTRFUN)(int); 
PTRFUN pFun; 
void main() 

      pFun = CA::lcFun; 
      ca.(*pFun)(2); 

        在这里,指针的定义与使用都加上了“类限制”或“对象”,用来指明指针指向的函数是那个类的这里的类对象也可以是使用new得到的。比如: 
CA *pca = new CA; 
pca->(*pFun)(2); 
delete pca; 
        而且这个类对象指针可以是类内部成员变量,你甚至可以使用this指针。比如:
        类CA有成员变量PTRFUN m_pfun; 
void CA::lcFun2() 

     (this->*m_pFun)(2);
}
        一句话,使用类成员函数指针必须有“->*”或“.*”的调用。

------------------------------------------------------------------------------------------------

//============================================================================== // WARNING!! This file is overwritten by the Block UI Styler while generating // the automation code. Any modifications to this file will be lost after // generating the code again. // // Filename: D:\NXopen\BaiduSyncdisk\studio\hkjm\ui\hkjm.cpp // // This file was generated by the NX Block UI Styler // Created by: MiCH-CEO // Version: NX 12 // Date: 08-06-2025 (Format: mm-dd-yyyy) // Time: 19:18 (Format: hh-mm) // //============================================================================== //============================================================================== // Purpose: This TEMPLATE file contains C++ source to guide you in the // construction of your Block application dialog. The generation of your // dialog file (.dlx extension) is the first step towards dialog construction // within NX. You must now create a NX Open application that // utilizes this file (.dlx). // // The information in this file provides you with the following: // // 1. Help on how to load and display your Block UI Styler dialog in NX // using APIs provided in NXOpen.BlockStyler namespace // 2. The empty callback methods (stubs) associated with your dialog items // have also been placed in this file. These empty methods have been // created simply to start you along with your coding requirements. // The method name, argument list and possible return values have already // been provided for you. //============================================================================== //------------------------------------------------------------------------------ //These includes are needed for the following template code //------------------------------------------------------------------------------ #include "hkjm.hpp" using namespace NXOpen; using namespace NXOpen::BlockStyler; //------------------------------------------------------------------------------ // Initialize static variables //------------------------------------------------------------------------------ Session *(hkjm::theSession) = NULL; UI *(hkjm::theUI) = NULL; //------------------------------------------------------------------------------ // Constructor for NX Styler class //------------------------------------------------------------------------------ hkjm::hkjm() { try { // Initialize the NX Open C++ API environment hkjm::theSession = NXOpen::Session::GetSession(); hkjm::theUI = UI::GetUI(); theDlxFileName = "hkjm.dlx"; theDialog = hkjm::theUI->CreateDialog(theDlxFileName); // Registration of callback functions theDialog->AddApplyHandler(make_callback(this, &hkjm::apply_cb)); theDialog->AddOkHandler(make_callback(this, &hkjm::ok_cb)); theDialog->AddUpdateHandler(make_callback(this, &hkjm::update_cb)); theDialog->AddInitializeHandler(make_callback(this, &hkjm::initialize_cb)); theDialog->AddDialogShownHandler(make_callback(this, &hkjm::dialogShown_cb)); } catch(exception& ex) { //---- Enter your exception handling code here ----- throw; } } //------------------------------------------------------------------------------ // Destructor for NX Styler class //------------------------------------------------------------------------------ hkjm::~hkjm() { if (theDialog != NULL) { delete theDialog; theDialog = NULL; } } //------------------------------- DIALOG LAUNCHING --------------------------------- // // Before invoking this application one needs to open any part/empty part in NX // because of the behavior of the blocks. // // Make sure the dlx file is in one of the following locations: // 1.) From where NX session is launched // 2.) $UGII_USER_DIR/application // 3.) For released applications, using UGII_CUSTOM_DIRECTORY_FILE is highly // recommended. This variable is set to a full directory path to a file // containing a list of root directories for all custom applications. // e.g., UGII_CUSTOM_DIRECTORY_FILE=$UGII_BASE_DIR\ugii\menus\custom_dirs.dat // // You can create the dialog using one of the following way: // // 1. USER EXIT // // 1) Create the Shared Library -- Refer "Block UI Styler programmer's guide" // 2) Invoke the Shared Library through File->Execute->NX Open menu. // //------------------------------------------------------------------------------ extern "C" DllExport void ufusr(char *param, int *retcod, int param_len) { hkjm *thehkjm = NULL; try { UF_initialize(); //开发的许可函数,初始化 thehkjm = new hkjm(); // The following method shows the dialog immediately thehkjm->Show(); } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } if(thehkjm != NULL) { delete thehkjm; thehkjm = NULL; }UF_terminate(); //释放许可函数,结束化 } //------------------------------------------------------------------------------ // This method specifies how a shared image is unloaded from memory // within NX. This method gives you the capability to unload an // internal NX Open application or user exit from NX. Specify any // one of the three constants as a return value to determine the type // of unload to perform: // // // Immediately : unload the library as soon as the automation program has completed // Explicitly : unload the library from the "Unload Shared Image" dialog // AtTermination : unload the library when the NX session terminates // // // NOTE: A program which associates NX Open applications with the menubar // MUST NOT use this option since it will UNLOAD your NX Open application image // from the menubar. //------------------------------------------------------------------------------ extern "C" DllExport int ufusr_ask_unload() { //return (int)Session::LibraryUnloadOptionExplicitly; return (int)Session::LibraryUnloadOptionImmediately; //return (int)Session::LibraryUnloadOptionAtTermination; } //------------------------------------------------------------------------------ // Following method cleanup any housekeeping chores that may be needed. // This method is automatically called by NX. //------------------------------------------------------------------------------ extern "C" DllExport void ufusr_cleanup(void) { try { //---- Enter your callback code here ----- } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } } int hkjm::Show() { try { theDialog->Show(); } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } return 0; } //------------------------------------------------------------------------------ //---------------------Block UI Styler Callback Functions-------------------------- //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //Callback Name: initialize_cb //------------------------------------------------------------------------------ void hkjm::initialize_cb() { try { group0 = dynamic_cast<NXOpen::BlockStyler::Group*>(theDialog->TopBlock()->FindBlock("group0")); hk2edge = dynamic_cast<NXOpen::BlockStyler::CurveCollector*>(theDialog->TopBlock()->FindBlock("hk2edge")); hk1edge = dynamic_cast<NXOpen::BlockStyler::CurveCollector*>(theDialog->TopBlock()->FindBlock("hk1edge")); hk1sd = dynamic_cast<NXOpen::BlockStyler::ExpressionBlock*>(theDialog->TopBlock()->FindBlock("hk1sd")); hk2sd = dynamic_cast<NXOpen::BlockStyler::ExpressionBlock*>(theDialog->TopBlock()->FindBlock("hk2sd")); group = dynamic_cast<NXOpen::BlockStyler::Group*>(theDialog->TopBlock()->FindBlock("group")); hkdj = dynamic_cast<NXOpen::BlockStyler::ExpressionBlock*>(theDialog->TopBlock()->FindBlock("hkdj")); hk2jd = dynamic_cast<NXOpen::BlockStyler::ExpressionBlock*>(theDialog->TopBlock()->FindBlock("hk2jd")); hk1jd = dynamic_cast<NXOpen::BlockStyler::ExpressionBlock*>(theDialog->TopBlock()->FindBlock("hk1jd")); vector0 = dynamic_cast<NXOpen::BlockStyler::SpecifyVector*>(theDialog->TopBlock()->FindBlock("vector0")); bodySelect0 = dynamic_cast<NXOpen::BlockStyler::BodyCollector*>(theDialog->TopBlock()->FindBlock("bodySelect0")); color1 = dynamic_cast<NXOpen::BlockStyler::ObjectColorPicker*>(theDialog->TopBlock()->FindBlock("color1")); color2 = dynamic_cast<NXOpen::BlockStyler::ObjectColorPicker*>(theDialog->TopBlock()->FindBlock("color2")); } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } } //------------------------------------------------------------------------------ //Callback Name: dialogShown_cb //This callback is executed just before the dialog launch. Thus any value set //here will take precedence and dialog will be launched showing that value. //------------------------------------------------------------------------------ void hkjm::dialogShown_cb() { try { //---- Enter your callback code here ----- } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } } //------------------------------------------------------------------------------ //Callback Name: apply_cb //------------------------------------------------------------------------------ // 应用按钮回调函数 - 读取所有控件数据 //------------------------------------------------------------------------------ int hkjm::apply_cb() { int errorCode = 0; // 错误代码,0表示成功 try { // 获取NX会话工作部件 NXOpen::Session* theSession = NXOpen::Session::GetSession(); NXOpen::Part* workPart = theSession->Parts()->Work(); NXOpen::UI* theUI = NXOpen::UI::GetUI(); // ===== 1. 处理曲线选择器1的值 ===== std::vector<NXOpen::Curve*> sectionCurves1; if (hk1edge) { // 使用智能指针管理属性列表内存 std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk1edge->GetProperties()); std::vector<NXOpen::TaggedObject*> selObjs = props->GetTaggedObjectVector("SelectedObjects"); for (NXOpen::TaggedObject* obj : selObjs) { if (NXOpen::Curve* curve = dynamic_cast<NXOpen::Curve*>(obj)) { sectionCurves1.push_back(curve); } } } // ===== 2. 处理曲线选择器2的值 ===== std::vector<NXOpen::Curve*> sectionCurves2; if (hk2edge) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk2edge->GetProperties()); std::vector<NXOpen::TaggedObject*> selObjs = props->GetTaggedObjectVector("SelectedObjects"); for (NXOpen::TaggedObject* obj : selObjs) { if (NXOpen::Curve* curve = dynamic_cast<NXOpen::Curve*>(obj)) { sectionCurves2.push_back(curve); } } } // ===== 3. 获取hk1sd表达式值 ===== double hk1sdValue = 0.0; if (hk1sd) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk1sd->GetProperties()); hk1sdValue = props->GetDouble("Value"); } // ===== 4. 获取hk2sd表达式值 ===== double hk2sdValue = 0.0; if (hk2sd) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk2sd->GetProperties()); hk2sdValue = props->GetDouble("Value"); } // ===== 5. 获取hkdj表达式值 ===== double hkdjValue = 0.0; if (hkdj) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hkdj->GetProperties()); hkdjValue = props->GetDouble("Value"); } // ===== 6. 获取hk1jd表达式值 ===== double hk1jdValue = 0.0; if (hk1jd) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk1jd->GetProperties()); hk1jdValue = props->GetDouble("Value"); } // ===== 7. 获取hk2jd表达式值 ===== double hk2jdValue = 0.0; if (hk2jd) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(hk2jd->GetProperties()); hk2jdValue = props->GetDouble("Value"); } // ===== 8. 获取矢量方向 ===== NXOpen::Vector3d directionVec(0.0, 0.0, 1.0); // 默认Z轴 if (vector0) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(vector0->GetProperties()); directionVec = props->GetVector("Vector"); } // ===== 9. 处理选中的实体 ===== std::vector<NXOpen::Body*> selectedBodies; if (bodySelect0) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> props(bodySelect0->GetProperties()); std::vector<NXOpen::TaggedObject*> selObjs = props->GetTaggedObjectVector("SelectedObjects"); for (NXOpen::TaggedObject* obj : selObjs) { if (NXOpen::Body* body = dynamic_cast<NXOpen::Body*>(obj)) { selectedBodies.push_back(body); } } } // ===== 10. 获取颜色选择器1的颜色 ===== int colorIndex1 = 0; if (color1) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> colorProps(color1->GetProperties()); std::vector<int> colors = colorProps->GetIntegerVector("Value"); if (!colors.empty()) colorIndex1 = colors[0]; } // ===== 11. 获取颜色选择器2的颜色 ===== int colorIndex2 = 0; if (color2) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> colorProps(color2->GetProperties()); std::vector<int> colors = colorProps->GetIntegerVector("Value"); if (!colors.empty()) colorIndex2 = colors[0]; } // ===== 3. 创建拉伸特征 ===== if (!sectionCurves1.empty() && hk1sdValue != 0.0) { // 设置撤销标记 NXOpen::Session::UndoMarkId markId = theSession->SetUndoMark( NXOpen::Session::MarkVisibilityVisible, "拉伸操作"); // 创建拉伸构建器 NXOpen::Features::ExtrudeBuilder* extrudeBuilder = workPart->Features()->CreateExtrudeBuilder(nullptr); // 创建截面 NXOpen::Section* section = workPart->Sections()->CreateSection( 0.001, 0.001, 0.05); extrudeBuilder->SetSection(section); // 创建曲线规则 - 使用dumb规则 std::vector<NXOpen::SelectionIntentRule*> rules; if (!sectionCurves1.empty()) { // 创建dumb曲线规则 - 直接传递曲线向量 NXOpen::SelectionIntentRule* curveRule = workPart->ScRuleFactory()->CreateRuleCurveDumb(sectionCurves1); rules.push_back(curveRule); } // 获取帮助点(曲线中点)- 使用UF函数兼容NX12 NXOpen::Point3d helpPoint(0.0, 0.0, 0.0); if (!sectionCurves1.empty()) { // 使用UF函数获取曲线参数范围 double limits[2]; UF_MODL_ask_curve_props(sectionCurves1[0]->Tag(), limits, NULL, NULL); // 计算中点参数 double midParam = (limits[0] + limits[1]) / 2.0; // 评估曲线中点位置 UF_EVAL_p_t eval_p; UF_CURVE_evaluate(sectionCurves1[0]->Tag(), &midParam, 0, .001, eval_p); helpPoint = NXOpen::Point3d(eval_p[0], eval_p[1], eval_p[2]); } // 添加到截面 - 使用正确的API签名 section->AddToSection( rules, // 规则向量 sectionCurves1[0], // 种子曲线 NULL, // 起始连接对象(无) NULL, // 结束连接对象(无) helpPoint, // 帮助点 NXOpen::Section::ModeCreate // 创建模式 ); // 设置拉伸方向 NXOpen::Direction* extrudeDirection = workPart->Directions()->CreateDirection(directionVec); extrudeBuilder->SetDirection(extrudeDirection); // 设置拉伸范围 NXOpen::GeometricUtilities::Limits* limits = extrudeBuilder->Limits(); limits->StartExtend()->Value()->SetRightHandSide("0"); limits->EndExtend()->Value()->SetRightHandSide( std::to_string(hk1sdValue).c_str()); // 设置布尔操作类型(创建新实体) extrudeBuilder->BooleanOperation()->SetType( NXOpen::GeometricUtilities::BooleanOperation::BooleanTypeCreate); // 执行拉伸操作 NXOpen::NXObject* featureNXObject = extrudeBuilder->Commit(); NXOpen::Features::Feature* feature = dynamic_cast<NXOpen::Features::Feature*>(featureNXObject); // 设置颜色 int colorIndex = 0; if (color1) { std::unique_ptr<NXOpen::BlockStyler::PropertyList> colorProps(color1->GetProperties()); std::vector<int> colors = colorProps->GetIntegerVector("Value"); if (!colors.empty()) colorIndex = colors[0]; } if (feature && colorIndex > 0) { // 使用GetEntities获取特征创建的所有实体 std::vector<NXOpen::TaggedObject*> entities; feature->GetEntities(entities); // 过滤出Body对象 for (NXOpen::TaggedObject* obj : entities) { if (NXOpen::Body* body = dynamic_cast<NXOpen::Body*>(obj)) { body->SetColor(colorIndex); break; // 只设置第一个体 } } } // 清理资源 extrudeBuilder->Destroy(); section->Destroy(); } } catch (std::exception& ex) { errorCode = 1; hkjm::theUI->NXMessageBox()->Show("错误", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } catch (...) { errorCode = 1; hkjm::theUI->NXMessageBox()->Show("错误", NXOpen::NXMessageBox::DialogTypeError, "未知错误"); } return errorCode; } //------------------------------------------------------------------------------ //Callback Name: update_cb //------------------------------------------------------------------------------ int hkjm::update_cb(NXOpen::BlockStyler::UIBlock* block) { try { if(block == hk2edge) { //---------Enter your code here----------- } else if(block == hk1edge) { //---------Enter your code here----------- } else if(block == hk1sd) { //---------Enter your code here----------- } else if(block == hk2sd) { //---------Enter your code here----------- } else if(block == hkdj) { //---------Enter your code here----------- } else if(block == hk2jd) { //---------Enter your code here----------- } else if(block == hk1jd) { //---------Enter your code here----------- } else if(block == vector0) { //---------Enter your code here----------- } else if(block == bodySelect0) { //---------Enter your code here----------- } else if(block == color1) { //---------Enter your code here----------- } else if(block == color2) { //---------Enter your code here----------- } } catch(exception& ex) { //---- Enter your exception handling code here ----- hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } return 0; } //------------------------------------------------------------------------------ //Callback Name: ok_cb //------------------------------------------------------------------------------ int hkjm::ok_cb() { int errorCode = 0; try { errorCode = apply_cb(); } catch(exception& ex) { //---- Enter your exception handling code here ----- errorCode = 1; hkjm::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox::DialogTypeError, ex.what()); } return errorCode; } //------------------------------------------------------------------------------ //Function Name: GetBlockProperties //Description: Returns the propertylist of the specified BlockID //------------------------------------------------------------------------------ PropertyList* hkjm::GetBlockProperties(const char *blockID) { return theDialog->GetBlockProperties(blockID); } 错误提示:错误(活动) E0165 函数调用中的参数太少 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 388 错误(活动) E0167 "double *" 类型的实参与 "double" 类型的形参不兼容 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 388 错误(活动) E0020 未定义标识符 "UF_CURVE_evaluate" hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 395 错误(活动) E0852 表达式必须是指向完整对象类型的指针 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 396 错误(活动) E0852 表达式必须是指向完整对象类型的指针 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 396 错误(活动) E0852 表达式必须是指向完整对象类型的指针 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 396 错误(活动) E0304 没有与参数列表匹配的 重载函数 "NXOpen::DirectionCollection::CreateDirection" 实例 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 411 错误(活动) E0140 函数调用中的参数太多 hkjm D:\NXopen\BaiduSyncdisk\studio\hkjm\hkjm.cpp 441 曲线中点可以考虑用int UF_CURVE_ask_centroid(tag_t curve_id,double centroid [ 3 ])tag_t (tag_t类型) curve_id Input(输入) 曲线或边的tag double (实数型) centroid [ 3 ] Input(输入) 曲线或边的中心点坐标
最新发布
08-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值