|
This:
typedef struct __Item
{
int m_iXX1;
int m_iXX2;
list<__Item> m_Right;
}_Item;
The list<__Item> is not a valid type since it recursively depends on a type which it is itself part of. Ouch! Compare it to this:
struct list {
int value;
list next;
};
You need another level of indirection...
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
I'm designing a crossplatform (Win/Unix) object and having problems typedef'ing an iterator for a set of these objects. The actual object is IProjectObserver (but that is of course, unimportant). The compiler complains about the 2nd typedef in IProjectObserver.h. The error message is:
Error C2653: 'set<class IProjectObserver *,int,class std::allocator<class IProjectObserver *> >' : is not a class or namespace name.
#ifndef IProjectObserver_h
#define IProjectObserver_h
#include <set>
using std::iterator;
using std::set;
class IProjectObserver
{
public:
IProjectObserver();
virtual ~IProjectObserver();
public:
virtual void handleEvent
(void* pEvent) = 0;
};
typedef set< IProjectObserver *, int > ProjectObserverSet;
typedef set< IProjectObserver *, int >::iterator ProjectObserverSetIterator;
#endif The code compiles fine if I comment out the 2nd typedef. Any help would be appreciated. Thanks!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I fixed my syntax error and now just end up with a bunch of warnings, similar to the slew of warnings I get when I use simple STL in my app (actually my lib). Odd.
Convenience typedefs
typedef set< IProjectObserver *> ProjectObserverSet;
typedef ProjectObserverSet::iterator ProjectObserverSetIterator; /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
You can use the std prefix:
typedef set< IProjectObserver *> ProjectObserverSet;
typedef std::set< IProjectObserver *>::iterator ProjectObserverSetIterator;
Best regards,
Alexandru Savescu
|
|
|
|
|
|
When you write using std::set that does not recursively use nested classes in set (such as iterator ) so you have to write std::set<blah blah>::iterator
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
|
Is that C++ or a workaround for a broken VC++?
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
Jörgen Sigvardsson wrote:
Is that C++ or a workaround for a broken VC++?
It's far too early in the morning to try and find it in the C++ spec, so let's just assume the latter for now.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Safe bet.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
i *think* set uses 1 param.Did you intend to use map.it should work fine.
benefactor
|
|
|
|
|
Yes, I'd fixed that syntax error. Thanks,
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Are there any special requirements/dlls/etc. that your users computers need if you implement ATL / WTL / STL ? New to this area.
"Best file compression around: DEL *.* = 100% compression."
<><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
I can only answar for ATL.
When using ATL you can select either to do a static link, in which case the users don't need the dll's, or you can link dynamically, then the users gonna need the dll's.
It's up to you
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thank you
"Best file compression around: DEL *.* = 100% compression."
<><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
For WTL, there are no DLLs
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I think that some STL bits will pull in MSVCP60.DLL, which implements part of the C++ runtime library.
For the life of me, I can't remember what bits...
Steve S
[This signature space available for rent]
|
|
|
|
|
I had the impression that all the STL is implemented in header files which you include. Since STL uses templates all the implementation is in class declaration. Therefore, everything is statically linked.
Also, if you go the Dinkumware page[^] of VC fixes all you have to do is download a new version of the patched header file and put it in the include directory.
Of course, I might be wrong....
Best regards,
Alexandru Savescu
|
|
|
|
|
Some classes are actually in a DLL. Things such as std::string and std::wstring are there.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks for clearing it out.
Best regards,
Alexandru Savescu
|
|
|
|
|
+ parts of the iostreams.
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
Yes, put in IQ > 50 in User requirements below the System requirements on the box.
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
How can I decide whether the control is in design mode or not. I mean whether it's in an IDE such as VB and is being dragged and dropped, but not running as part of an application.
|
|
|
|
|
Not sure if this will work or not - give it a go - add the following to your control class:
BOOL IsUserMode()
{
BOOL bUserMode = TRUE;
HRESULT hRet = GetAmbientUserMode(bUserMode);
if (FAILED(hRet) || bUserMode)
{
return TRUE;
}
return FALSE;
}
If the control is in design mode, then the above returns FALSE ... I think ...
Faith. Believing in something you *know* isn't true.
|
|
|
|
|