LangProc / langproc-2021-lab

2 stars 5 forks source link

Fractions #44

Open ljc20 opened 2 years ago

ljc20 commented 2 years ago

Hi, I am really struggling with the separating of the fractions part in order for them to be interpreted by c++ correctly. I was wondering if there was a simple way of doing this

ibricchi commented 2 years ago

Once you have it as a string, cpp has string find, and split which can help you get each part of the fraction. For reference for the functions look at https://www.cplusplus.com/reference/string/string/