🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42920

Template problem with gcc 2.7

#42920
From: Torsten Hilbrich
Date: Wed, 18 Oct 1995 00:00
41 lines
1399 bytes
Here is a small part of a project that I'd like to use. The class buffer
shall have access to the private and protected members of block. But I 
get error messages when compiling the file

The command line used is: g++ -c test.cc

The error messages are:

g++ -c test.cc
In file included from test.cc:1:
test.h:14: `maxElemente' was not declared in this scope
test.h:14: empty component declaration
test.h:15: parse error before `;'

:::::::  test.cc ::::::::::::::
#include "test.h"
:::::::::::::::::::::::::::::::

:::::::  test.h  ::::::::::::::
#ifndef _block_h_
#define _block_h_

#include <stddef.h>
#include <sys/types.h>

template <class T, size_t maxElemente>
class Buffer;

template <class T, size_t maxElemente = 1000>
class Block {
 public:
  Block();
  friend Buffer<T, maxElemente>;
};

#endif
:::::::::::::::::::::::::::::::::::::::::::::::::::

Thanks for your quick help,

	Torsten
Technical Details
Message-ID: <462gdu$fvh@hahn.informatik.hu-berlin.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,de651611d8967a83,start
X-Google-Attributes: gid11318c,public
From: hilbrich@informatik.hu-berlin.de (Torsten Hilbrich)
Subject: Template problem with gcc 2.7
Date: 1995/10/18
Message-ID: <462gdu$fvh@hahn.informatik.hu-berlin.de>
X-Deja-AN: 117750905
organization: Humboldt University Berlin, Department of Computer Science
keywords: templates gcc-2.7 friend
newsgroups: gnu.gcc.help