Add readString inputHelper

This commit is contained in:
Joel Thomas
2026-02-19 10:33:28 +05:30
parent 7faa6a076f
commit 135ccffa72
2 changed files with 14 additions and 0 deletions
@@ -1 +1,11 @@
/*
Author: Joel Mathew Thomas
Date: 19-02-2026
*/
#include "inputHelper.h"
void util::readString(std::string& value)
{
getline(std::cin >> std::ws, value);
}
@@ -5,6 +5,8 @@ Date: 18-02-2026
#pragma once
#include <iostream>
#include <limits>
#include <string>
#include <stdexcept>
namespace util
@@ -20,4 +22,6 @@ namespace util
throw std::runtime_error("Invalid Console Input");
}
}
void readString(std::string&);
}