找回密码 注册 QQ登录
一站式解决方案

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?在线3D打印服务,一键上传,自动报价 
查看: 15919|回复: 7
打印 上一主题 下一主题

[求助] 生成四方块的代码错在哪里?先谢谢啦!

[复制链接]
跳转到指定楼层
1
发表于 2009-5-29 19:44:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
下面是生成生成四方块的代码,在编译时出错,请高手帮忙看看是什么原因……


//////////////////////////////////////////////////////////////////////////////
//
//  41.cpp
//
//  Description:
//      Contains Unigraphics entry points for the application.
//
//////////////////////////////////////////////////////////////////////////////
//  Include files
#include <uf.h>
#include <uf_exit.h>
#include <uf_ui.h>
#if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun )
# include <strstream>
#   include <iostream>
using std:strstream;
using std::endl;
using std::ends;
using std::cerr;
#else
# include <strstream.h>
#   include <iostream.h>
#endif
#include "41.h"
//----------------------------------------------------------------------------
//  Activation Methods
//----------------------------------------------------------------------------
//  Unigraphics Startup
//      This entry point activates the application at Unigraphics startup
extern "C" DllExport void ufsta( char *param, int *returnCode, int rlen )
{
    /* Initialize the API environment */
    int errorCode = UF_initialize();
    if ( 0 == errorCode )
    {
        /* TODO: Add your application code here */
   double corner_pt[3]={10,10,10};
         char *edge_len[3]={"30","20","10"};
         tag_t blk_tag;
         UF_MODL_create_block1(UF_NULLSIGN,corner_pt,edge_len,&blk_tag);
        /* Terminate the API environment */
        errorCode = UF_terminate();
    }
    /* Print out any error messages */
    PrintErrorMessage( errorCode );
}
//----------------------------------------------------------------------------
//  Utilities
//----------------------------------------------------------------------------
// Unload Handler
//     This function specifies when to unload your application from Unigraphics.
//     If your application registers a callback (from a MenuScript item or a
//     User Defined Object for example), this function MUST return
//     "UF_UNLOAD_UG_TERMINATE".
extern "C" int ufusr_ask_unload( void )
{
    return( UF_UNLOAD_UG_TERMINATE );
}
/* PrintErrorMessage
**
**     Prints error messages to standard error and the Unigraphics status
**     line. */
static void PrintErrorMessage( int errorCode )
{
    if ( 0 != errorCode )
    {
        /* Retrieve the associated error message */
        char message[133];
        UF_get_fail_message( errorCode, message );
        /* Print out the message */
        UF_UI_set_status( message );
        // Construct a buffer to hold the text.
        ostrstream error_message;
        // Initialize the buffer with the required text.
        error_message << endl
                      << "Error:" << endl
                      << message
                      << endl << endl << ends;
     // Write the message to standard error
        cerr << error_message.str();
    }
}

本帖最后由 qindongjun88 于 2009-5-29 19:46 编辑
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
 楼主| 发表于 2009-5-29 19:50:52 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
3
发表于 2009-5-29 20:39:45 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
4
发表于 2009-5-30 19:01:14 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
5
 楼主| 发表于 2009-5-30 20:38:20 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
6
发表于 2009-6-2 16:13:17 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
7
 楼主| 发表于 2009-6-3 17:36:08 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
8
发表于 2009-6-13 14:25:34 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-9-21 10:58 , Processed in 0.028954 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表