help....reading numbers from file and arranging them

hey guys, i'm new in c++ programming. i need help with C++ code with functions to read from a text file a sequence of numbers of arbitrary length and print out only positive numbers belonging to the sequence in increasing order. For example 21, 12, 44, 21, -5, 63, 0, to be printed out as 12, 21, 21, 44, 63.

i'll really appreciate your help
1
2
3
4
5
6
7
8
9
10
11
#include <vector>
#include <iostream>

int main(){
   std::vector<int> numbers;
   int n;
   while( std::cin>>n )
      numbers.push_back(n);

   //numbers has all the inputted numbers
}
Topic archived. No new replies allowed.