🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52216

(none)

#52216
From: Yagna Raj Pant
Date: Wed, 20 Jan 1993 06:35
41 lines
2106 bytes
I tried to compile the following simple C++ program consisting of templates
using g++ (v2 preliminary) compiler manual page dated on 27 Dec 1991

#include <iostream.h>

template <class Type>
Type min (Type a, Type b) {
  return a < b ? a: b;
}

int 
main()
{
  cout << "The minum of 10 and 20 is = " << min(10, 20);
  cout << "The minimum of 10.0 and 20.0 is = " << min(10.0, 20.0);
  cout << "The minimum of 10.23f and 20.34f = " << min(10.23F, 20.34F);
  cout << "The minimum of 10.23L and 24.56L = " << min(10.23L, 24.56L);
  return 0;
}

and got the message:

as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min
as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min
as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min
as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min
as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min
as0: Error: test4.C, line 4: .ent must precede the definition of the symbol min
as0: Error: test4.C, line 4: Conflicting definition of symbol min


Can you please let me know what is happening. Thanks.


Yagna	yagna@cs.unsw.oz.au
University of New South Wales, Australia 
Technical Details
Message-ID: <930120062916.3622@cs.unsw.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.unsw.oz.AU!yagna

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,f4ce9c05f1809aa3,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-01-19 22:43:22 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.unsw.oz.AU!yagna
From: yagna@cs.unsw.oz.AU (Yagna Raj Pant)
Newsgroups: gnu.gcc.help
Subject: (none)
Date: 20 Jan 1993 01:35:14 -0500
Organization: GNUs Not Usenet
Lines: 42
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <930120062916.3622@cs.unsw.oz.au>