无法转换std :: vector< std :: vector< char> >' to' int'

发布于 2025-01-31 13:47:13 字数 494 浏览 1 评论 0原文

vector<vector<char>> map(x+2,vector<char>(y+2));

Read_map(x, y, map, &task);

Main.h Main.h

void Read_map(int x,int y, vector<vector<char>> &map, int *task);

MAIN中编译后的 它说不能转换std :: vector&lt; std :: vector&lt; char&gt; &gt; to int

和in head.h 它说“向量”尚未声明

我们是否需要在Head.h #include&lt; vector&gt;中声明?

谁能告诉我如何解决? 请

谢谢

In main

vector<vector<char>> map(x+2,vector<char>(y+2));

Read_map(x, y, map, &task);

In head.h

void Read_map(int x,int y, vector<vector<char>> &map, int *task);

after compiler in main
it say cannot convert std::vector<std::vector<char> > to int

and in head.h
it say 'vector' has not been declared

whether we need to declared in head.h #include<vector>?

can anyone tell me how to solve it?
please

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文