Archived

This topic is now archived and is closed to further replies.

winstl annoyances

This topic is 5178 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve decided to learn winstl. When compiling a simple test program:
#include <iostream>
#include <stlsoft/winstl_findfile_sequence.h>

int main()
{
	winstl::findfile_sequence fs("f:\\tmp", "*.*");
	typedef winstl::findfile_sequence::const_iterator fs_iterator;
	
	for (fs_iterator itr = fs.begin(); itr != fs.end(); ++itr)
	{
		std::cout << *itr << std::endl;
	}
} 
... I get a message and a bunch warnings. Message: "The WinSTL libraries are not compatible with variable length character representation schemes such as MBCS". The message comes from winstl.h, when #ifdef _MBCS. What does this mean? What is MBCS? Warning (6 of them): "winstl_filesystem_traits.h(355): C4267: ''argument'' : conversion from ''size_t'' to ''DWORD'', possible loss of data". This one is a bit surprising, because one would expect that winstl should go well with both windows and stl types. I''ve also tried an enclosed example, but recieved the same warning (and above message). Any ideas? I don''t like the thought of disabling it. I use .NET 2003 Standard.

Share this post


Link to post
Share on other sites
Well, MBCS stands for multi-byte character set (i think?) and Microsoft or someone invented it to try and extend ascii, but it''s quite ugly because it requires you to parse a string. In Project Settings (VC6), there''s an compiler #define for _MBCS. I don''t know what you do with it, change it to _UNICODE? Delete it?

Share this post


Link to post
Share on other sites