I am having a difficult time moving data from std::string to a CString that is part of a structure. Here is the essence:
The error for the NOT ok line of code is:
the displayed hint is: CString sfid_name
Upon hovering over the ->sfid_name the hint is: CString __unnamed_00a8_1::sfid_name
What do I need to change?
We need to know what a dragon is
before we study its anatomy.
(Bryan Kelly, 2010)
Code:
typedef struct
{
int stream_number;
CString sfid_name;
int sifd_counter;
CString msg_prefix;
int length;
} td_input_stream;
td_input_stream *p_stream_struct;
p_stream_struct = new( td_input_stream );
status = Get_Next_Definition( &expected, &t_string );
if( status )
{
CString sfid_name( t_string.c_str()); // test code, is ok
p_stream_struct->sfid_name( t_string.c_str() ); // desired code, NOT ok
p_stream_struct->sfid_name = sfid_name;
}
There is a clue that I don't know how to interpert. Upon hovering the cursor over sfid_name in the first line of test codeerror C2064: term does not evaluate to a function taking 1 arguments
the displayed hint is: CString sfid_name
Upon hovering over the ->sfid_name the hint is: CString __unnamed_00a8_1::sfid_name
What do I need to change?
We need to know what a dragon is
before we study its anatomy.
(Bryan Kelly, 2010)