I'm trying to write a program that uses the Boost library to input a string date in the format mm/dd/year and outputs to the string its corresponding day of the week. I wrote the program that I thought would accomplish this, but it doesn't seem to work. Below is the code I wrote:
When I compile this using codeblocks it gives me the error "In function `ZN5boost9date_time19month_str_to_ushortINS_9gregorian10greg_monthEEEtRKSs':|
C:\Users\rosa\Desktop\test3\..\..\..\..\Lib\boost_1_55_0\boost\date_time\date_parsing.hpp|67|undefined reference to `boost::gregorian::greg_month::get_month_map_ptr()'". And it takes me to the file date_parsing.hpp and highlights line 67. I don't understand why this isn't working. What am I doing wrong?
Thanks that worked (I added libboost_date_time-mgw47-mt-d-1_55.a to Link Libraries under Linker settings) and it runs correctly if I have the date 2002/1/25, but it doesn't run properly if I have the date in the format 1/25/2002. In the command prompt it outputs:
terminate called after throwing an instance of 'boost::exception_detail::clone_i
mpl<boost::exception_detail::error_info_injector<boost::gregorian::bad_day_of_mo
nth> >'
what(): Day of month value is out of range 1..31
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Process returned 3 (0x3) execution time : 8.542 s
Press any key to continue.
How do I get this to work regardless how the date was written? For example if it was written as 01/25/2002 or 1/25/2002 or 2002/1/25.