| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3800 人关注过本帖
标题:新手求教 用的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
快速回复:新手求教 用的vs一直提示表达式必须包含类类型 也不知道是啥意思
数据加载中...
 
   



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

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