c error

woshiwgk 2012-10-29 08:31:59
:\vc++\microsoft visual studio\common\msdev98\bin\ehh.cpp(1) : fatal error C1083: Cannot open include file: 'vector.h': No such file or directory
请解释一下。另外c1083代表什么意思?谢谢
...全文
287 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
woshiwgk 2012-10-30
  • 打赏
  • 举报
回复
http://hgdp.uchicago.edu/
你帮我看一下吧,我从这个网上下的
zjs100901 2012-10-30
  • 打赏
  • 举报
回复
关键部位没贴出来。
woshiwgk 2012-10-30
  • 打赏
  • 举报
回复
#include <string.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;


struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) < 0;
}
};


class Ehh {


public:

vector<float> ehh0;
vector<float> ehh1;

vector<int> mhap0;
vector<int> mhap1;

// statistic computed (interested)

// uncorrected rho
float rho0;
float rho1;


// corrected rho
float c_rho0;
float c_rho1;

// longest common hapolotype length in 0 and 1
float hap_len0;
float hap_len1;

// integral based on hap_len0 and hap_len1
float int_ps0;
float int_ps1;


// the integral for 0 and 1
float int_s0;
float int_s1;

// gap stats, snp density

float max_ggap; // maximum gap length in integrated region

int total_marker; // number of markers in integrated region
int gap_count; // number of gaps over threshold
float total_int_dist; // total integrated genetic distance



// status, if ehh score above thresh at the end of the region
int status;


Ehh(){
thresh = 0.25;
hapcount_thresh = 4;
}

void load_data(const vector<char *> &data, const vector<float> &map, const vector<float> &gap);

void set_T_thresh(float value){
thresh = value;
}


private:

vector<char *> whole_data;
vector<float> gmap;
vector<float> gapv; //correction factors for gaps in gmap

vector<char *> data0;
vector<char *> data1;

float thresh;
int hapcount_thresh;


void compute_ehh();
float compute_ehh_score(int n0,int n1,int len, const vector<char *> &data,int &index);
zhuyf87 2012-10-30
  • 打赏
  • 举报
回复
.h是为了兼容c的老写法了吧。
贴一下main的实现看看。
buyong 2012-10-30
  • 打赏
  • 举报
回复
你先搞清楚这个程序是控制台程序还是win32程序还是mfc程序还是什么别的程序
[Quote=引用 9 楼 的回复:]

-------------------Configuration: 20121030 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/20121030.exe : fatal error LNK11……
[/Quote]
woshiwgk 2012-10-30
  • 打赏
  • 举报
回复
-------------------Configuration: 20121030 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/20121030.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

20121030.exe - 1 error(s), 0 warning(s)
还是不能运行
图灵狗 2012-10-30
  • 打赏
  • 举报
回复
包含文件部分需要改成这样:

#include <string.h>
#include <math.h>
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;



[Quote=引用 7 楼 的回复:]

我去掉.h后还是不行,
#include <vector.h>
#include <string.h>
#include <iostream>
#include <map.h>
#include <math.h>

struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
r……
[/Quote]
woshiwgk 2012-10-30
  • 打赏
  • 举报
回复
我去掉.h后还是不行,
#include <vector.h>
#include <string.h>
#include <iostream>
#include <map.h>
#include <math.h>

struct ltstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) < 0;
}
};


class Ehh {


public:

vector<float> ehh0;
vector<float> ehh1;

vector<int> mhap0;
vector<int> mhap1;

// statistic computed (interested)

// uncorrected rho
woshiwgk 2012-10-30
  • 打赏
  • 举报
回复
http://hgdp.uchicago.edu/Software/
怎么用C运行得到结果
Daybreak110 2012-10-30
  • 打赏
  • 举报
回复
没有包含向量的头文件,去掉“.h”试试看,如果还是显示这个问题可能是软件的问题。
图灵狗 2012-10-29
  • 打赏
  • 举报
回复
对向量的引用用这样的语句:
#include <vector>
using namespace std;
zjs100901 2012-10-29
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

我老板给的一个程序
[/Quote]
VC6的安装目录下有文件vector,是STL的容器。

也许你老板所指的vector.h跟STL无关。
AnYidan 2012-10-29
  • 打赏
  • 举报
回复
路径对吗?
woshiwgk 2012-10-29
  • 打赏
  • 举报
回复
我老板给的一个程序
zjs100901 2012-10-29
  • 打赏
  • 举报
回复
去掉.h就行了。
那本书叫你加.h的?
zjs100901 2012-10-29
  • 打赏
  • 举报
回复
你可以在MSDN上输C1083查询。

69,370

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧