Re: Using a Class as parameter



I moved it to a new file and it is workig ok now, thanks!
Bruno

"John Carson" <jcarson_n_o_sp_am_@xxxxxxxxxxxxxxx> wrote in message
news:%23smIJpGfFHA.3656@xxxxxxxxxxxxxxxxxxxxxxx
> "Bruno" <brunopiovanREMOVETHIS@xxxxxxxxx> wrote in message
> news:e7Hvz7EfFHA.1044@xxxxxxxxxxxxxxxxxxxx
>> I have #include "perry.h" in level.h because I use an enum from
>> perry.h
>> and I have #include "level.h" in perry.h because I use a class from
>> level.h.
>> I think, should I create a new file for the enum then?
>
> There are lots of technically possible solutions. You could put the enum
> in a separate file, you could move the enum to level.h, you could use a
> forward declaration in perry.h for CLevel, you could combine perry.h and
> level.h into a single file or ... Which of the technically possible
> solutions is best is a design issue and I don't know enough about your
> application to know what would be good design (which is, in any case, a
> somewhat subjective judgement and one that I am generally reluctant to
> make).
>
> --
> John Carson


.



Relevant Pages

  • Fragile Fences
    ... I have been working with Eclipse and some large enum classes. ... If engineers designed buildings the way computer programmers design ... Any unbalance has then be isolated to whether it is inside ... We need to start thinking of IDEs as data entry devices, ...
    (comp.lang.java.programmer)
  • Re: PEP 354: Enumerations in Python
    ... -1 for this particular proposal as a builtin. ... design of something that isn't terribly useful to begin with. ... As for preventing nonsensical operations on enum constants: ... Some alternative designs implement each enumeration as its own ...
    (comp.lang.python)
  • Re: create enumerated property for custom control
    ... values in design mode. ... if you view properties of the control/class ... who's property you'd like to edit, if one is an enum, VS will display a ... Sergey Poberezovskiy wrote: ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: Typesafe Enum Pattern
    ... impersonating the design in C#. ... designs in .NET which mirror the equivalent Java enums by using a C# ... you are obviously very passionate about improvements to the enum ... to the type-safe enum pattern to begin with. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Should I return an int or an enum?
    ... > public enum MyEnum ... the amount of verifications performed by the compiler. ... Bruno. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast