标题:新手求教 用的vs一直提示表达式必须包含类类型 也不知道是啥意思
只看楼主
遗情处有诗章
Rank: 1
等 级:新手上路
帖 子:47
专家分:0
注 册:2017-3-10
结帖率:75%
 问题点数:0 回复次数:1 
新手求教 用的vs一直提示表达式必须包含类类型 也不知道是啥意思
程序代码:
// ConsoleApplication18.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include"iostream"
#include<algorithm>
#include<iterator>
using namespace std;
struct stu
{
    char name[20];
    int number;
}student[4] = { "sally",123456,"mark",354567,"ben",354699,"coco",122213 };

struct stu
{
    char name[20];
    int number;
}st[4];
int main()
{
    for each(st[4], student[4]);
    {
        st[4] == student[4];
        cout << "st[4]" << endl;
    }

    vector<int> st;
    st.resize(4);

    copy(student, student + 4, st.begin());

        cout << "stud contains:"<<endl;
        ostream_iterator<int> osint(cout, "-");
    copy(st.begin(), st.end(), osint);

    cout << endl;
    system("pause");
    return 0;
}
搜索更多相关主题的帖子: 类型 include int student cout 
2017-09-24 18:13
遗情处有诗章
Rank: 1
等 级:新手上路
帖 子:47
专家分:0
注 册:2017-3-10
得分:0 
求助帮忙纠错 完全不会
2017-09-24 18:15



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-480914-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.268543 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved