由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - got a little c++ coding problem
相关主题
面试问题想学Python
Please help me take a look at the programA try-catch problem in C++
谁能告诉为啥最后为啥输出两个Ca simple question for C++ class
[转载] 简单的题都不敢做了.cout怎么不换行输出大量字符串?
about smpp client side programmingwhich func will be called?
a novice c++ question: array with nonconstant length请问一个exception题目
请大侠推荐一本PYTHON的入门书ask a C++ inheritance question
Regular Expressions Cookbook, 2nd EditionA C++ Question
相关话题的讨论汇总
话题: sequence话题: int话题: temp话题: sum话题: cin
进入Programming版参与讨论
1 (共1页)
w*****j
发帖数: 49
1
Hi, every one, I'm a real novice in c++. I'm trying to write a little
programme.
the simplified code is as following:
#include "std_lib_facilities.h"
vector sequence;
void get_sequence(){
int temp;
cout<<"please input the members of the sequence:";
while(cin>>temp){
sequence.push_back(temp);
}
}
void sum_up(){
int n;
cout<<"please indicate how many number you want to sum up:\n";
cin>>n;
}

int main(){
get_sequence();
sum_up();
return 0;
}
when the program
1 (共1页)
进入Programming版参与讨论
相关主题
A C++ Questionabout smpp client side programming
关于文件读取的C++ 问题?a novice c++ question: array with nonconstant length
reverse words, not the Microsoft one!!!请大侠推荐一本PYTHON的入门书
问个BT问题 :)(c )Regular Expressions Cookbook, 2nd Edition
面试问题想学Python
Please help me take a look at the programA try-catch problem in C++
谁能告诉为啥最后为啥输出两个Ca simple question for C++ class
[转载] 简单的题都不敢做了.cout怎么不换行输出大量字符串?
相关话题的讨论汇总
话题: sequence话题: int话题: temp话题: sum话题: cin