[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

compilering af templates



Jeg er ved at lave et bibliotek, der kan
håndtere vektorer i et rum med periodiske randbetingelser.
Det er en længere smøre, men pointen er at jeg laver en template
på følgende form

template<double Laengde, int Dimensioner>
class vektor{
  double x[Dimensioner];
  void checkboundaries;
  ...........
}

Men hvad nu hvis jeg definerer 1000 vektorer.
main{
 vektor <3.1415, 2> x[1000];
};

Hvor mange gange bliver tallet 3,1415 så lagret i hukommelsen?

Compiler programmet den kun klassen en gang?

Hvad hvis man laver en for-løkke, der genererer temporære
vektorer med varierende Dimensioner og længder?
--- Begin Message ---
Hi. This is the qmail-send program at sslug.dk.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<sslug@sslug>:
sslug@sslug er ikke tilmeldt SSLUG - vi accepterer kun beskeder fra tilmeldte adresser. Se http://www.sslug.dk/antispam.html

--- Below this line is a copy of the message.

Return-Path: <sslug@sslug>
Received: (qmail 15931 invoked by uid 9); 23 Mar 1999 10:33:07 -0000
To: sslug@sslug
Path: not-for-mail
From: gnalle <sslug@sslug>
Newsgroups: sslug.cprog
Subject: compilering af templates
Date: Tue, 23 Mar 1999 11:33:06 +0100
Organization: RUC
Lines: 19
Message-ID: <sslug@sslug>
NNTP-Posting-Host: carid.ruc.dk
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.34 i686)

Jeg er ved at lave et bibliotek, der kan
håndtere vektorer i et rum med periodiske randbetingelser.
Det er en længere smøre, men pointen er at jeg laver en template
på følgende form

template<double Laengde, int Dimensioner>
class vektor{
  double x[Dimensioner];
  void checkboundaries;
  ...........
}

Men hvad nu hvis jeg definerer 1000 vektorer.
main{
 vektor <3.1415, 2> x[1000];
};

Hvor mange gange bliver tallet 3,1415 så lagret i hukommelsen?
Compiler den kun klassen en gang?

--- End Message ---


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *