>
> Will this work on Windows if the prototxt file (text version) was created 
> on Linux? The complete name of the file is stored in file_name as a string. 
> The code below generates a badalloc exception on C++ when run on a Windows 
> 10 machine. 
>
> std::ifstream file(file_name.c_str(), std::ifstream::binary);
> std::stringstream buffer;
> buffer << file.rdbuf();
> std::string input = buffer.str();
>
> success = google::protobuf::TextFormat::ParseFromString(input, 
> &msg_params_proto_);
>
> I also tried to covert the prototxt file to its binary format and read it 
> into input. I then used this to parse it but that returns 0 as well.
>
> Would appreciate any help from the community! 
>

I am using protobuf version 2.5.0.a - my project has been on this version 
for a while so I am kind of stuck with it. Could the old version be an 
issue here?  

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to