Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
Edit: Ta tymczasowa tablica może byc docelową. Ale i tak polecam bardziej STLa.
Ostatnio zmieniony przez szulak : 23-04-2014, 19:15
var equalsPatients = onlinePatients.FindAll(x => localPatients.Exists(y => y.PatientGuid == x.PatientGuid));
irc: freenode.net in #torgdevs
var newPatients = onlinePatients.FindAll(x => localPatients.Exists(y => y.PatientGuid != x.PatientGuid));
foreach (var item in localPatients)
{
if(onlinePatients.Exists(x => x.PatientGuid==item.PatientGuid))
equallyPatients.Add(item);
else
newPatients.Add(item);
}
irc: freenode.net in #torgdevs
Ostatnio zmieniony przez Kusterek : 24-04-2014, 12:40
irc: freenode.net in #torgdevs
Problem z komputerem? Instrukcja diagnostyczna
Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat."Don't worry, I'm just a pervert"Cytat został ukryty, ponieważ ignorujesz tego użytkownika. Pokaż cytat.
template<class T>
void copy2dArray(T** target, T** source, int xDim, int yDim)
{
for (int x = 0; x < xDim; x++)
{
for (int y = 0; y < yDim; y++)
target[x][y] = source[x][y];
}
}
int main()
{
int sizeX = 5;
int sizeY = 5;
int** ary = new int*[sizeX];
for(int i = 0; i < sizeX; ++i)
ary[i] = new int[sizeY];
for (int x = 0; x < sizeX; x++)
{
for (int y = 0; y < sizeY; y++)
ary[x][y] = 66;
}
int** ary2 = new int*[1];
for(int i = 0; i < 1; ++i)
ary2[i] = new int[1];
copy2dArray(ary2, ary, 1, 1);
//TODO: cleanup
return 0;
}
class Foo { };
int main()
{
Foo* f1 = new Foo;
Foo* f2 = new(f1) Foo;
assert((int)f1 == (int)f2);
return 0;
}
Ostatnio zmieniony przez szulak : 25-04-2014, 08:03
int **tab = new int*[5];
for(int i=0;i<5;i++)
tab[i] = new int[5];
//wypelnianie
for(int i=0;i<5;i++)
for(int j=0;j<5;j++)
cin >> tab[i][j];
//nowa tablica
int **tmp = new int*[1];
for(int i=0;i<1;i++)
tmp[i] = new int[1];
//wypelnianie
for(int i=0;i<1;i++)
for(int j=0;j<1;j++)
tmp[i][j]=tab[i][j];
delete[] tab;
tab=tmp;
Ostatnio zmieniony przez Kusterek : 25-04-2014, 11:58
irc: freenode.net in #torgdevs
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki