Path: utzoo!attcan!uunet!mcvax!enea!erbe.se!prc From: prc@ERBE.SE (Robert Claeson) Newsgroups: comp.lang.c++ Subject: Syntax error when defining conversion operator Keywords: conversion unsigned long Message-ID: <337@maxim.ERBE.SE> Date: 21 Nov 88 14:12:14 GMT Organization: ERBE DATA AB Lines: 19 In a class, I want to define a conversion operator from the class to unsigned long. So, I write: class foo { unsigned long bar; public: ... operator unsigned long() { return bar; } ... }; When I compile this (AT&T C++ Translator 1.1), get a "syntax error" from cfront. I've found NOTHING in the manual that prevents me from defining conversion operators for multi-word data types. Is there any way to circumvent this? -- Robert Claeson ERBE DATA AB rclaeson@ERBE.SE