Diafores metaksy gcc 3.4 kai 3.3

Karaoulis Marios marios at lemnos.geo.auth.gr
Sat Nov 20 10:54:12 EET 2004


Eimai enas mallon metrios pros kakos programmatisths. Xrhsimopoio thn
c++ gia kapoious algori8mopus pou grafo. Exo tsatistei me olh auth thn
katastash pou epikratei sthn c++.

Analoga ton compiler to programmataki mou trexei, allou den kanei oute
kan compile (p.x. se gcc 2.95 kai gcc 3.3.1 kanei compile se gcc 3.4 kai
ms c++ oxi).

H aitia tou problhmatos briseketai se ena header file pou egrapsa gia na
kano memory allocation.

Ston gcc 3.4 diamarturetai gia to std::bad_alloc,
std::exception,std::exception.what(). Exo dokimasei na bgalo to
namespace std, na xrhsimopoihsw to using namespacce std, kai oti
syndiasmo fantastei kaneis. Me auton ton tropo "paizei" se diaforous
compilers. Alla ston gcc 3.4 me tipota. 

8a mporousa na mhnw me ton gcc 3.3, den exo kanena apolutos problhma.
Apla fobamai mhn exo kanei kamia patata.

Polu parakalo opoios exei xrono as riksei kamia matia sta duo arxeia pou
stelno (to .h kai .cpp) na paro to kwlomaster na teleiono.Ta neura
mou...






H logikh einai h ekshs

#include <memorh.h>
#include <iostream>
#include <new>
#include <excpeption>
#include "marutil.h"


int main()
{
//pinaka a 20 x 10 diadtasewn. Perna kai to onoma tou pinaka gia naksero
//an kapoios pinakas xtyphsei na ksero pou

float **a=float_matrix(20,10,a);


}









Euxaristo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marutil.cpp
Type: text/x-c++
Size: 6519 bytes
Desc: not available
URL: <http://lists.hellug.gr/pipermail/linux-greek-users/attachments/20041120/5aa8d38a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marutil.h
Type: text/x-c-header
Size: 1646 bytes
Desc: not available
URL: <http://lists.hellug.gr/pipermail/linux-greek-users/attachments/20041120/5aa8d38a/attachment-0001.bin>


More information about the Linux-greek-users mailing list