C++ strings | Sololearn: Learn to code for FREE!

+1

C++ strings

Hi guys I Need a help. I have a string like this string bornDate = "01/01/2010"; I want to access to the 2010 and change It into integer value and store It in a variable. How can I Do It?

3/14/2021 8:43:04 PM

Hammad Yaqub

3 Answers

New Answer

+2

I'm a newbie with C++ so there can be a better solution. However, here's the code: https://code.sololearn.com/c64Mjexjhc3h/?ref=app

+1

Ok thanks