To onlinus : http://sk.wikipedia.org/wiki/Zdrojov%C3%BD_k%C3%B3d checkni a budes vediet co chce ...
Příspěvky odeslané z IP adresy 158.193.98.–
SNV
Anonymní uživatel
Ne.
xXx
O nazvy atributov samozrejme neslo, ide iba o tuto chybu:
c:\documents and settings\administrator\my documents\visual studio 2008\projects\pole2\pole\cpole.cpp(70) : error C3867: 'CPole::compare': function call missing argument list; use '&CPole::compare' to create a pointer to member
xXx
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <iostream>
#include "CPole.h"
#include "CError.h"
using namespace std;
CPole::CPole(int pocet,int dolnyindex) : aPocet(pocet), aDolnyIndex(dolnyindex),
aPole(aPocet>0 ? new double[aPocet] : NULL)
{
printf("CPole()\n");
}
CPole::CPole(const CPole &src) : aPocet(src.aPocet), aDolnyIndex(src.aDolnyIndex),
aPole(aPocet>0 ? new double[aPocet] : NULL)
{
if(aPole != NULL) {
memmove(aPole,src.aPole,aPocet*sizeof(double));
}
}
CPole &CPole::operator = (const CPole &src)
{
if(this != &src) {
if(aPole!=NULL) {
delete[] aPole;
aPocet = 0;
aDolnyIndex = 0;
}
if(src.aPole!=NULL) {
aPocet = src.aPocet;
aDolnyIndex = src.aDolnyIndex;
aPole = new double[aPocet];
memmove(aPole,src.aPole,aPocet*sizeof(double));
}
}
return *this;
}
CPole::~CPole(void)
{
printf("~CPole()\n");
if(aPole!=NULL)
delete[] aPole;
}
double CPole::operator[](int index)
{
if(index<aDolnyIndex || index>aDolnyIndex+aPocet-1) throw CError("Zly index!\n",aDolnyIndex);
else return aPole[index-aDolnyIndex];
}
void CPole::Set(int index, double hodnota)
{
aPole[index-aDolnyIndex] = hodnota;
}
int compare( const void *a, const void *b)
{
int cislo1 = *((int*)a);
int cislo2 = *((int*)b);
if (cislo1 < cislo2) return -1;
if (cislo1 == cislo2) return 0;
return 1;
}
void CPole::AplikujQsort(CPole pole[], int ArraySize)
{
// qsort(pole, ArraySize, sizeof(CPole),Compare);
}
Nevedel by niekto pomoct s qsortom s tym, ze nejde o klasicke pole ale o obalovu triedu pola realnych cisel?
Ak to klasicky qsort qsort((void *)table, TableSize, sizeof(table[0]), sortFunction); tak mi hadze vzdy chybu ... Vopred vdaka
xXx
A ty si mi vlastne hore zmenil uz kod v tom Pop-e, ak som to dobre pochopil :)
xXx
Dakujem, ale este bude treba menit aj metodu Pop, ci nie?
xXx
A nemohol by si mi prosim ta ukazat tu zmenu priamo na priklade v mojom kode?
xXx
Gentoo neodporucam, ked nie si pokrocily ;)
xXx
A este nieco:
http://tldp.org/HOWTO/SPARC-HOWTO-12.html
xXx
http://en.wikipedia.org/wiki/Aurora_SPARC_Linux
xXx
http://www.damnsmalllinux.org/
Tvoj PC je este nad odporucane poziadavky: http://www.damnsmalllinux.org/wiki/index.php/Minimum_Hardware_Requirements