I have a question about input. I'm very new to C++ and I was wondering how to take input from the user until the user use Ctrl-d to stop. It's a very simple question and I have looked everywhere to try to figure it out. I know it has to be some simple loop but I'm not sure what type of loop and what conditions it has to has. Any help is appreciated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <cmath>
#include <iostream>
usingnamespace std;
class integers() {
public:
int num();
int sum();
};
int main()
{
int i;
while(True);
cout << "Pease enter integer values:";
cin >> i;
}