求助! C++中的 error C2296 相关

来源:百度知道 编辑:UC知道 时间:2024/05/24 17:39:24
#include "../../std_lib_facilities.h"
vector <int> readFile1(istream & ist1);
vector <int> readFile2(istream & ist2);
double avg1(vector <int> v1);
double avg2(vector <int> v2);
double ss1(vector <int> v1);
double ss2(vector <int> v2);
double t_test(vector<int> v1 , vector<int>v2);

int main()
{
string fname1 = "small1.txt";
string fname2 = "small2.txt";
cout << "Please enter the file name of first sample: ";
cin >> fname1;
cout << "You entered: " << fname1 << endl;

ifstream ist(fname1.c_str());
while(!ist){
cerr << "file opening error!" << endl;
ist.clear();
cout << "Please enter the file name of first sample: ";
cin >> fname1;
cout<< "You entered: " << fna

double b = 1/n1 + 1/n2 ;这句?没错呀。
double a = (ss1+ss2)/((n1+n2)-2);错了。两个函数怎么相加?
应该是double a = (s1+s2)/((n1+n2)-2);吧

ss1和ss2是两个函数名,不能这样直接相加,不知道你要实现什么,试试把ss1和ss2换成s1、s2