Add readString inputHelper
This commit is contained in:
@@ -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&);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user