当前位置:首页
开发技术指南» 文章正文
    引言:

 ·weblogic能在windows下,支持asp    »显示摘要«
    摘要: weblogic能在windows下,支持asp? ......
    摘要: 下面是一个测试的例子: <script language="javascript"> function play() { tsound.src = "d:\\" + musicselector.value; tsound.open("d:\\" + musicselector.value); tsound.play()......


200分,一个问题请高手帮忙

用C/C++语言编一个程序:  
  指定一个圆心,任意长度自己输入的半径的一个圆,然后求它上面的任意点到圆外点  
  的长度~~~  
  解决立即给分!!!  
  急~~~  
  感谢~~~

NO.1   作者: healer_kx

暂时给你一个两点距离的求法程序.  
   
  #include   <math.h>  
   
  class   Point  
  {  
  public:  
  Point()  
  :x(0.0f),   y(0.0f)  
  {  
   
  }  
  Point(float   x,   float   y)  
  {  
  this->x   =   x,   this->y   =   y;  
  }  
  friend   float   _distance(const   Point&   p1,   const   Point&   p2);  
   
  private:  
  float   x;  
  float   y;  
   
  };  
   
  #define   SQR(x)   ((x)   *   (x))  
   
  float   _distance(const   Point&   p1,   const   Point&   p2)  
  {  
  return   sqrt(SQR(p1.x   -   p2.x)   +   SQR(p1.y   -   p2.y));  
  }  
   
   
   
  int   main()  
  {  
  Point   x(0.0f,   0.0f);  
  Point   y(1.0f,   1.0f);  
   
  float   d   =   _distance(x,   y);  
   
   
  return   0;  
  }  
   
 


 ·后台处理的问题    »显示摘要«
    摘要: 我的一个界面程序有些操作可能需要很长时间的后台运行才能完成,而这时候界面还要响应用户的其他操作,那么就应该起一个后台线程来进行处理,完成之后进行通知。 我想写一个函数将这个过程封装起来以如下方式 dosomethingansy(arg1,arg2,...,function1) dosomethingansy启动一个线程进行处理,在线程完成后调用function1通知界面做一些更新。 我是c......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE