Search found 39 matches

by Cheo
Mon Feb 05, 2007 6:13 pm
Forum: wxDev-C++
Topic: Allegro Package issue
Replies: 7
Views: 1948

I was unable to build it myself, too complicated.

Thus, I uninstalled wxDec-C++ and installed Dev-C++. From Dev-C++ is possible to download allegro 4.2.1 at devpaks.org Community Devpaks.

Why is not possible to connect to devpaks.org from wxDev-C++?
by Cheo
Sun Feb 04, 2007 1:03 pm
Forum: wxDev-C++
Topic: Allegro Package issue
Replies: 7
Views: 1948

That was the problem.

Thanks a lot.


Ermmm.... Another question. How do I update my current allegro package to the latest version? :oops:
by Cheo
Sun Feb 04, 2007 11:37 am
Forum: wxDev-C++
Topic: Allegro Package issue
Replies: 7
Views: 1948

Hi, Tony These are the default linker libraries of the project: -lalleg_s -lgdi32 -ldxguid -lole32 -ldinput -lddraw -lwinmm -ldsound I added -lalleg at the beginning: -lalleg -lalleg_s -lgdi32 -ldxguid -lole32 -ldinput -lddraw -lwinmm -ldsound Now it compiles, but it doesn't run. An error dialog app...
by Cheo
Sun Feb 04, 2007 1:31 am
Forum: wxDev-C++
Topic: Allegro Package issue
Replies: 7
Views: 1948

Allegro Package issue

Hi I've downloaded and installed (automatically) the Allegro Package from Dev-C++ Primary Server Pack. wxDev-C++ version is: 6.10.1 Allegro Package version is: 4.0 I created a new Allegro project. A default code appears in the main document. I haven't edited or altered the default code in any way. S...
by Cheo
Thu Feb 01, 2007 7:40 pm
Forum: wxDev-C++
Topic: Translators for wxDev-C++
Replies: 14
Views: 3419

Hi

If buildere gets fed-up translating into Spanish, give me a shout. I can make Spanish also.
by Cheo
Wed Jan 31, 2007 9:10 pm
Forum: C++ Development
Topic: multiple instance definitions issue when calling a Dialog
Replies: 8
Views: 1618

Thank you, phlox81.

I'll research about singleton pattern.
by Cheo
Wed Jan 31, 2007 8:24 pm
Forum: C++ Development
Topic: multiple instance definitions issue when calling a Dialog
Replies: 8
Views: 1618

lol. manager is in this case a global Variable, something you really shouldn't use in C++. For that reason, you should also not use the extern keyword. If you need global access to Heromanager, make it a singelton. Damn, not only I made a fool of myself, but in addition, when I thought I had a good...
by Cheo
Wed Jan 31, 2007 7:33 pm
Forum: C++ Development
Topic: multiple instance definitions issue when calling a Dialog
Replies: 8
Views: 1618

What happens, when you remove the Frame header from the dialog header? multiple definitions of 'manager' - first defined here But wait, after adding extern , which failed to link the first time, worked fine the second time. I removed the Frame header from the Dialog header afterwards, and now works...
by Cheo
Wed Jan 31, 2007 3:42 pm
Forum: C++ Development
Topic: multiple instance definitions issue when calling a Dialog
Replies: 8
Views: 1618

multiple instance definitions issue when calling a Dialog

I have a header file with class declarations. I have a Frame source code that works fine with the classes. I have a Dialog source code that fails to work with the classes. The class declaration header file has: #ifndef FILE_WITH_CLASS_DEFINITION_H #define FILE_WITH_CLASS_DEFINITION_H // ... class de...
by Cheo
Sun Jan 28, 2007 11:54 pm
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

Yes, I can. Again, my fault.

I need to sleep, my head is killing me.

Thanks
by Cheo
Sun Jan 28, 2007 9:40 pm
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

I cannot declare vector<Hero> m_Heroes private, only public. ???
Access etc. could and should be implemented in the Manager class itself,
f.e. with an Editmember(int index) method, which launches a Dialog.
I understand. I'll work on it.
by Cheo
Sun Jan 28, 2007 8:35 pm
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

I think he runs better if he implements this manager as a singleton, that way you can access it from any point in the application. That's the intention. However, I'm having problems to access the data members once the instance is created. Declaring std::vectors and a function to store instances is ...
by Cheo
Sun Jan 28, 2007 2:34 pm
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

It does compile in the OnClick funtion of WxButton, which is what I wanted: void HeroeFrm::WxButton1Click6(wxCommandEvent& event) { manager.m_Heroes.Add( Hero("David", 100, 1, 1, 1, 1) ); } =D> However, the above constructor doesn't compile outside the scope of any function of the Fram...
by Cheo
Sun Jan 28, 2007 1:59 am
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

Sure you can. I do that every day. You cannot add them to the Widgets, but you can't do that eather with the wxObjArray. The STL offers a lot of algorithms and accessiterators for its containers, which makes me favor them. Oooops, yes I can. I forgot to add std:: in front of the vector (habit of us...
by Cheo
Sat Jan 27, 2007 10:39 pm
Forum: C++ Development
Topic: How to create and store instances of a class at runtime
Replies: 24
Views: 4325

don't know if this might help you, but how about using template classes? you'll only have to write that template once and then you can store whatever you want in it, in whatever project you want ;) :shock: My God. I've heard about templates before, but I'm still struggling with simple classes. I'll...