[ndnSIM] to_string is not a member of std error in ndnSIM

Jack Baldasso jackbaldasso at gmail.com
Mon Dec 10 14:44:01 PST 2018


I'm using Ubuntu 16.04 LTS.
I was able to find a solution on Stack Overflow (
https://stackoverflow.com/questions/19122574/to-string-isnt-a-member-of-std/19122592).
I implemented the std::string ToString(T val) and it worked.

#include <string>#include <sstream>
template <typename T>
std::string ToString(T val){
    std::stringstream stream;
    stream << val;
    return stream.str();}




On Mon, Dec 10, 2018 at 5:37 PM John Baugh <jpbaugh at umich.edu> wrote:

> What OS are you running and what compiler/version.
>
> Thanks
>
> John
>
> On Mon, Dec 10, 2018, 5:33 PM Jack Baldasso <jackbaldasso at gmail.com wrote:
>
>> Hi,
>>
>> I deployed a package on ndnSIM 1.0 (this is my baseline scenario where I
>> will be comparing my approach with), but in my simulation file I have a
>> statement `std::to_string()` which is giving me the following error:
>>
>>     error: ‘to_string’ is not a member of ‘std’
>>
>> I couldn't find this issue on the mailing list. How do I fix it?
>> Basically I just need to convert an integer value into a string.
>>
>> Thanks,
>> Jack
>>
>> PS: I'm using ndnSIM 2.6 for my other approach.
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20181210/21ec6f65/attachment-0001.html>


More information about the ndnSIM mailing list