Salut , j’ai :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
struct UserIdentity
{
char* name;
int id;
};
 
std::map<std::string, int> g_UserIdentities = { { "Bob", 100 }, { "Jone", 101 },
            { "Alice", 102 }, { "Doe", 103 } };
 
/*
* Will be used in a DLL that will export UserIdentity struct
* OUT _UserIdentity
*/
 
void Ui_export(UserIdentity *_UserIdentity)
{
for (auto& t : g_UserIdentities)
    {
     _UserIdentity->name = t.first;
     _UserIdentity->id   = t.second;
    }
 
}
Donc svp comment exporter an array of UserIdentity dans Merçi.