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

 ·内蒙人进来    »显示摘要«
    摘要: 我赤峰克旗的 现在在上海 ......
    摘要: int i=10; int foo() { return i; } void fun(const int &p)//如何改成指针形式..书中说无法将临时变量的地址传递给指针的函数 //但是既然引用可以.为什么指针就不可以.引用不是也是传地址的吗? { cout<<p<<endl; } int main() { fun(foo()); syste......


这样声明string postfix[3]={"e","es","est","ed"};为什么编译器报错

这样声明string   _postfix[3]={"e","es","est","ed"};为什么编译器报错?部分源代码如下,完整的工程文件我上传在   http://free.ys168.com/?ak747   。  
   
  #ifndef   _enWord_h_  
  #define   _enWord_h_  
   
  #include   "Iword.h"  
  #include   <fstream>  
  class   enWord:public   Iword  
  {  
  public:  
  enWord(string   inWord):Iword(inWord){};  
   
  ~enWord(){};  
   
  ///返回单词原型  
  string   Prototype(){return   _prototype;};  
   
  private:  
  string   _prototype;  
  string   _postfix[3]={"e","es","est","ed"};  
  ifstream   irregular("c:\\AUTOEXEC.BAT");  
  void   Cut(string   postfix);  
   
  void   Irregular();  
   
  bool   Find(){};  
  };  
  #endif

NO.1   作者: hyq1986

注意这是在类中!  
   
  楼上的全错了  
   
  类成员变量在构造函数里初始化


    摘要: 我的系统一旦遇到要访问文件的时候就会出错,其中一个具体信息如下: 对路径 f:\bbs\skyboard\config\siteconst.config 的访问被拒绝。 说明: 执行当前 web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: system.unauthorizedaccessexception: 对路径......
» 本期热门文章:

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