Olá Garota Iniciante.
1° Eu preciso fazer este get retorna um vetor com um struct, como faço?
usando o seu codigo como base (pode-se usar pointers tbm):
std
::vector<MyStruct>& GetList(vector<MyStruct>& a_ListMyStruct)
{
...... return (a_ListMyStruct);
}
2° Estou usando Visual Studio C++. Nesta estrutura precisa conter hora, data, parametro. Defino tudo como string???
se vc quiser, pode definir sim como string, caso nao, segue minha sugestao:
#include <time.h>
typedef struct MyStruct
{
tm time;
MyParameterType parameter;
} MyTimeStructOrWhatever;
obs: tm eh definido no wchar.h assim:
struct
tm {
int tm_sec; /* seconds after the minute - [0,59] */
int tm_min; /* minutes after the hour - [0,59] */
int tm_hour; /* hours since midnight - [0,23] */
int tm_mday; /* day of the month - [1,31] */
int tm_mon; /* months since January - [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0,6] */
int tm_yday; /* days since January 1 - [0,365] */
int tm_isdst; /* daylight savings time flag */
};
best regards