Fonction d'alloaction dynamique

tomsawyerbelgique Messages postés 6 Date d'inscription mardi 18 mars 2003 Statut Membre Dernière intervention 29 mai 2003 - 29 mai 2003 à 16:41
tomsawyerbelgique Messages postés 6 Date d'inscription mardi 18 mars 2003 Statut Membre Dernière intervention 29 mai 2003 - 29 mai 2003 à 19:51
Pour une allocation dynamique d'un tableau à deux dimensions. Comme celle ci:

cout << "Tableau 2 dimantions" << endl;
// Initalisation
int** tab = new int*[p_size1_tab];
for(int i=0;i<p_size1_tab;++i)
{
tab[i]=new int[p_size2_tab];
}
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Je vais comment pour que cette allocation ce fasse dans une fonction ?

Merci, tom sawyer

2 réponses

cs_payen Messages postés 252 Date d'inscription mercredi 25 octobre 2000 Statut Membre Dernière intervention 1 mai 2005
29 mai 2003 à 18:53
j'ai mis la reponse il ya quelques jours ... faut chercher : http://www.cppfrance.com/forum.aspx?Article=12703
par contre, si tu as un souci, hesite pas ...
0
tomsawyerbelgique Messages postés 6 Date d'inscription mardi 18 mars 2003 Statut Membre Dernière intervention 29 mai 2003
29 mai 2003 à 19:51
merci bcp
0
Rejoignez-nous