Sign in to follow this  

Using bytes array as it was a file

This topic is 2539 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

In C# you could create a memory stream from the bytes which can be use like a file stream (like any other stream really). Does anyone know if there's something similar in the C++ stream library? I'd like to know the answer to this myself actually.

[Edited by - doesnotcompute on December 28, 2010 2:56:43 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by doesnotcompute
In C# you could create a memory stream from the bytes which can be use like a file stream (like any other stream really). Does anyone know if there's something similar in the C++ stream library? I'd like to know the answer to this myself actually.


If you write your code against the base interface std::iostream, you can interchange file streams, memory-backed streams, network-backed streams, or anything else that conforms to the interface. Pretty handy and basically the exact corresponding concept to doing that in C#.

Share this post


Link to post
Share on other sites
Quote:
Original post by Zahlman
Um... std::stringstream? Guys? Yeah? It lives in <sstream>.


I interpreted the question as being able to have a function like LoadFBX( "c:\model.fbx" ); but instead parse an array from RAM

Share this post


Link to post
Share on other sites

This topic is 2539 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this