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*

30th Sep 2020, 8:31 PM
reza jannati
reza jannati - avatar
1 Answer
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.
3rd Oct 2020, 10:55 AM
Adarsh Kunwar
Adarsh Kunwar - avatar