0
How can i create a command to use it in input in c++
For example I want to create a command name 'start_day' , and when user use it in input every string user type next will be save in that day // start_day 13/9/2020 // Today was boaring In the example above "today was boaring will be save in 13 / 9 / 2020 *Thanks*
1 Antwort
0
void start_day(unordered_map<string,string>&m)
{
string date,data;
cin>>date;
getline(cin,data);
m[date] = data;
}
By interpreting your example I came up with this, I hope this helps you.