[ndnSIM] std::cout and Interest::GetScope
alexander.afanasyev at ucla.edu
Sat Feb 23 06:44:01 PST 2013
This is just the way stream output in C++ works. GetScope returns 1-byte number (char), which is considered by std::ostream as a character, not number.
To solve the confusion, just add. static_cast<int> (...GetScope ()). and it should work as expected.
On Feb 23, 2013, at 5:51 AM, "Aaron" <aaronishere at qq.com> wrote:
> Hi, Alex
> I add
> Ptr<Node> node=m_pit->GetObject<Node>();
> std::cout<<"Node#"<<node->GetId() <<"interestheader->GetScope()"<<header->GetScope()<<std::endl; under the OnInterest function
> but why it can't show the number? It shows like below:
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
More information about the ndnSIM