Please need help with this problem. When I run the executable file, the console is not giving me time to enter the characters as requested in line 37 and I'm not able to identify the issue. It only works when I comment out both for-loops. The code is shown below:
#include "../../std_lib_facilities.h"
#include "../../Eigen/Eigen"
#include "../../Eigen/Dense"
#include <Windows.h>
#include <time.h>
using namespace Eigen;
int main()
{
SetConsoleTitle(TEXT("PipeThk_v1.0"));
system("CLS");
system("color F1");
time_t rawtime_start;
struct tm * timeinfo_start;
time(&rawtime_start);
timeinfo_start = localtime(&rawtime_start);
printf(asctime(timeinfo_start));
cout << "\nEnter nominal pipe sizes in 'in':\n";
vector<double> npss;
for (double nps; cin >> nps;)
npss.push_back(nps);
cout << "\n NPS\n";
for (const auto& i : npss)
cout << "\n " << i;
time_t rawtime_end;
struct tm * timeinfo_end;
time(&rawtime_end);
timeinfo_end = localtime(&rawtime_end);
cout << endl << endl << asctime(timeinfo_end);
cout << "\nEnter any character and hit enter to exit:\n";
char ans;
cin >> ans;
return 0;
}