🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.help
1 messages
1 total messages Started by Jeremy Pye Fri, 11 Aug 1995 12:14
Symantec C++ v7->7.04 templates ?
#1
Author: Jeremy Pye
Date: Fri, 11 Aug 1995 12:14
34 lines
1110 bytes
I have just tried to run the following piece of code in
symantec C++ v7.04. It runs ok under v7.0.
Why is it that this piece of code (using templates) doesn't
link ? Please explain. [Our manual is temporarily missing]

#include <iostream.h>

template <class T>
class A {
public:
	T	data;
public:
	A(T init) : data(init) {}
	void print(void);
};

template <class T> 
void A<T>::print(void)
{
	cout << "Hello " << data << endl;
}

void main()
{
	A<int>	a(10);
	
	a.print();
}


Link Errors:
	undefined: A<int>::print(void)

Jeremy Pye <cjp@sys.uea.ac.uk>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads