|
![](/i/fill.gif) |
Dan P <dan### [at] yahoo com> wrote:
> first, I thought enums had to assign to ints
And since when 'abcd' has not been an int?
> and
> second, I thought single quotes were for characters, not strings).
No, 'a' is not a character, it's an integer. 'ab' is also an integer.
Just try: std::cout << 'ab' << std::endl;
> The compiler agreed on both counts
If enumerated types can only be assigned with integers (which is true)
and 'abcd' is not an integer (which is false), then the compiler would
give you an error. However, the compiler did not give you an error and
thus the compiler is disagreeing with you.
> So, I created a PERL script to grab each of those
> strings and generate a file with defines called "povtypes.h" and made
> those defines with unique IDs starting from 1000.
What for? What is the current code doing wrong?
> Is there some program in-between that turns those
> happy 'strings' into numbers?
They are not strings. Learn C, will you?
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |