Date: Sat, 18 Jun 94 15:23:16 JST From: Stephen Turnbull To: js1 AT chclu DOT chemie DOT uni-konstanz DOT de Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: grxfont in C++ In C, enums are ints AFAIK. They can be assigned back and forth, no problem. In C++, again AFAIK, enum tags are types *different* from other integral types. If this is your problem, there will be an enumeration of allowed colors, probably called txo_color or something like that, and you must either cast the integer constants to that type or (preferably)) use the enumerators defined there. I don't know grxfont from a hole-in-the-ground, but this is the only case I can think of where assignment of an integral literal would break when switching from C to C++ (for example, signed char and unsigned char are different types, and at least one of them is different from char---but both 0 and 6 would be acceptable rvalues in an assignment to any char type). This is a feature of C++, I assure you. Since the problem first came up w.r.t. grx, a DJGPP-related package, this is a reasonable place to check. But for future reference (or if you don't get a solution here), you'd probably be better off in comp.lang.c++ for questions about intelligible error messages (if you can access Usenet). (The criterion is that never having used grx, I can guess what broke---I guess that's a catch-22 :-) +-----------------------------------------------------------------------+ | Stephen Turnbull | | University of Tsukuba, Institute of Socio-Economic Planning | | Tennodai 1-chome 1--1, Tsukuba, Ibaraki 305 JAPAN | | Phone: +81 (298) 53-5091 Fax: +81 (298) 55-3849 | | Email: turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp | | | | Founder and CEO, Skinny Boy Associates | | Mechanism Design and Social Engineering | | REAL solutions to REAL problems of REAL people in REAL time! REALLY. | | Phone: +81 (298) 56-2703 | +-----------------------------------------------------------------------+