bonjour,

voici mon probleme;

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
 
struct struct2
{
      int a;
      int b;
}
struct struct1
{
      int x;
      CArray<struct2,struct2> array2;
}
 
CArray<struct1,struct1> m_array;
struct1 structure1;
struct2 structure2;
 
structure2.a = 1;
structure2.b = 1;
 
structure1.array2.Add(structure2);
 
//lorsque je fait
m_array.Add(structure1)
jobtient l'erreur suivante;
error C2664: 'Add' : cannot convert parameter 1 from 'struct struct1 ' to 'struct struct1'.
Il me semble qu'il y avait qqchose de spécial à faire pour que ça fonctionne, définir un opérateur = ou qqchose du genre...

toute aide sera grandement apprécié

cybz
[FARSCAPE :MERCI]