24小时热门版块排行榜    

查看: 267  |  回复: 1

lijunjiexm

铁虫 (小有名气)

[求助] 关于C++的read的命令一个问题,谢谢

程序一小段,截取如下:
//--------------------------------------
//
//   Functions required in 'input.hpp'
//
//--------------------------------------

#include"input.hpp"

//--------- start reading of the input file -------------
void input::load(void)
{
  read_ABF(method,nb_replicas,t_step,nb_iter,freq_histo,freq,xi,beta,Ndim,a,sig,eps,h,w,xi_min,xi_max,Nxi,selection,c_selection);
  Nsolvent = Ndim*Ndim - 2;
}

//------------- Reading the file line by line --------------------
void input::read_ABF(int& method_, int& nb_replicas_, double& t_step_, int& nb_iter_, int& freq_histo_, int& freq_,double& xi_, double& beta_, int& Ndim_, double& a_, double& sig_,double& eps_, double& h_, double& w_, double& xi_min_, double& xi_max_, int& Nxi_, int& selection_, double& c_selection_)
{
  ifstream from("../input/input_file_ABF";
  read_item   (from,"Dynamics (0=Ovrdmpd, 1=Lngvn)  ",&method_);  
  read_item   (from,"Number of replicas             ",&nb_replicas_);  
  read_item(from,"Time step                 (dt) ",&t_step_);

不是很清楚read_ABF,和read _item的用法,能否稍微解释一下吗,谢谢?
read_ABF是定义一个函数名吗?
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

wangybcn

禁虫 (正式写手)

感谢参与,应助指数 +1
本帖内容被屏蔽

2楼2012-05-26 18:59:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 lijunjiexm 的主题更新
信息提示
请填处理意见