(Solved) – Read and interpret head line in C++ [closed]

  • by
(solved)-–-read-and-interpret-head-line-in-c++-[closed]

I am reading a C program. It loads a head line from a excel file using the following line which first to check if the unit is obeying the special form and, if so, stores it into the corresponding variables.

using stringstream = basic_stringstream, allocator>;

else if (stringstream(word) >> s_class >> s_info >> expiry >> timeFrame1 >> moneyness){......}

FYI, s_class, s_info, expiry, timeFrame1, moneyness are just string type.

Let’s say I have 3 excel unit cells as following:
USD LEVEL 20y; BLENDED TOTALRETURN 1 0; BLENDED VOL 1y 0.5;

For the first two, it wouldn’t get into the else if but third one will. s_class, s_info, expiry, timeFrame1, moneyness corresponds the BLENDED, VOL, 1, y, 0.5 respectively.

I want to ask what’s technology and knowledge behind this? And how can I do it in VBA?

Leave a Reply

Your email address will not be published. Required fields are marked *