I'm new to c++ .This is the first part of my program.I want the output of list a .But it doesn't give a output.only get input.After getting inputs the program stops.
#include <iostream>
using namespace std;
class clist {
public:
int i, j,k,times;
double numbers[1000];
clist () {
}
clist(int j) {
k = j;
cout << "Enter the numbers" << endl;
for (times = 0; times < k; times++) {
cin >> numbers[times];
}
}
void print_lista() {
for (times = 0; times < k; times++) {
cout << numbers[times] << "\t" << endl;
}
}
};
int main()
{
cout << "Enter how many numbers you want to enter" << endl;
clist obj;
cin >> obj.i;
clist obj2(obj.i);
clist obj3;
obj3.print_lista();
return 0;
}