qq_38197298
Screw_Toxic
2017-11-15 13:54

这个向量输出哪里错误了

  • class

#include
#include
using namespace std;
struct QUA
{
int x;
int y;
};
class block
{
public: vector c1;
public: vector c2;
};
vector b;
int main()
{
QUA q;
q.x=1;
q.y=2;
b[0].c1.push_back(q);
cout<<b[0].c1[0].x<<" "<<b[0].c1[0].y<<endl;

return 0;

}

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答