Geddy Lee pushed to the back of a vector. Now I've seen everything... ![]()
Is there a table anywhere that lists all the classes/algorithms/etc. that have been added to the std:: library?
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Geddy Lee pushed to the back of a vector. Now I've seen everything... ![]()
Is there a table anywhere that lists all the classes/algorithms/etc. that have been added to the std:: library?
Something I just remembered - if you want a quick and easy way to start using boost, this site provides an installer for the headers and pre-built binaries: (VS2003-VS2010, 32-bit only)
http://www.boostpro.com/download/
3 hours ago, C64 wrote
BTW: Does it work properly with Unicode characters? I see your code uses std::string, it would be good if we could safely use it with Unicode filenames. Or does Boost.Filesystem use UTF-8 as Unicode encoding instead of UTF-16, so std::string is OK in this case?
Thanks for clarifying this.
The path class supports multiple character types. So you can replace these:
void free_function(std::string const& file_name); void free_function(std::wstring const& file_name);
with this:
void free_function(boost::filesystem::path const& file_name);
One function instead of one for each string type you need to support.
http://www.boost.org/doc/libs/1_46_1/libs/filesystem/v3/doc/reference.html#class-path
Boost is truly great, not just from a content standpoint, but in how fast they release new versions/updates. I'm using it primary for TR1 support, but there's alot of other excellent stuff I've used:
I'm off to try mapped files, something I can use that I wasn't aware of - thanks Thomas.
7 hours ago, Deraynger wrote
Some general questions:
How would you return the vertices vector to an OpenGL function? What I do is (don't have it here, but somehow) something like:
1234567inlineconstvector<vert3>& Verts(void)const{return_vertices;}// Somewhere in loop codeglDrawElements( someVal, someVal, someVal, &myObj->Verts()[0] );
Why not just return the pointer?
vert3 const* Foo::vertices_data() const
{
if (_vertices.empty())
throw std::runtime_error("See Effective STL, item 16");
return &_vertices[0];
}
...
Foo foo;
vert3 const* data = foo.vertices_data();
What I'd like to see is a stand-alone VC++ product like you had back in the 90s. (I think it was called VC++ Pro?) I never understood why you guys deviated from that - is it really fair that I have to pay for C#, VB and whatever other .Net language is in VS Pro when I have no use for them? It's like being forced to buy the Godfather boxset when all I want is I and II. (Clarification: I'm not saying C#/VB quality = Godfather III quality, I'm simply saying I don't use them)
MFC - I think it's the best c++ option when you want an app that looks and feels like a Windows app. As others have said, the big problem is the code feels too non-standardish and outdated. I think even Qt suffers from this, but not quite to the same extent. It would be great to see std::containers, algorithms, etc. used in the MFC library, as well as some refactoring to use some of the current popular design patterns. (say, MVC)
C++0x - My guess is that it will be a good 3+ years before you can write code that's truly transparent across the major platforms/compilers, and I don't really see the point in writing C++0x based code until then. (I can get by with current standard + boost for now)
But, since you are looking for input, the items I prefer from the new standard are the ones that decrease verbosity - initializer lists, range-based for loops, constructors calling other constructors, data member initialization, etc. The less typing, the better IMO.