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

 

    摘要: 我只定义了cframewnd和cwinapp类,加载了菜单,但是无论怎样都无法使用加速键,为什么? 我看了单文档向导生成的代码,经测试 pdoctemplate = new csingledoctemplate( idr_mainframe, runtime_class(ctestdoc), runtime_class(cmainframe), runtime_class......
 ·关于精度控制的问题    »显示摘要«
    摘要: 我在jsp中有以下几句语句: <script language=javascript> x=a/b; </script> 现在所得x的精度很高我想问一下怎么样才能使它转化为精度为1.00这样的数值或字符串都有行. 注意:是在客户端脚本,不是服务端脚本! ......


关于vector的问题

TIME是一个类,我定义了缺省构造函数了和拷贝构造函数了,可vc6.0怎么还报错呀:  
   
  e:\program   files\microsoft   visual   studio\vc98\include\xutility(39)   :   error   C2679:   binary   =   :   no   operator   defined   which   takes   a   right-hand   operand   of   type   const   class   TIME   (or   there   is   no   acceptable   conversion)  
                  e:\program   files\microsoft   visual   studio\vc98\include\vector(170)   :   see   reference   to   function   template   instantiation   void   __cdecl   std::fill(class   TIME   *,class   TIME   *,const   class   TIME   &)   being   compiled  
   
  这是什么意思啊?  
   
  vector   <   TIME   >   vec;  
  好像只要  
  vec.push_back(t);  
  就报错

NO.1   作者: jinhuaxing

TIME&   TIME::operator   =   (TIME   &rhs   )  
   
  改成   operator   =   (const   TIME   &   rhs)试试  
   
  你的代码不全,我没有试

NO.2   作者: fishX

operator=(TIME&)   改为   operator=(const   TIME&),   copy   ctor   和operator==同样处理  
  int   year()   改成   int   year()   const,   month,   day等函数同样处理


 ·给提供个 酷酷的界面吧    »显示摘要«
    摘要: 越酷越好啊,没办法,老板喜欢! 谁给俺提供一个吧,谢谢了! ......
» 本期热门文章:

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