For component value, should pass const unsigned char *.
diff --git a/ndn-cpp/name.hpp b/ndn-cpp/name.hpp
index 45236d4..e64d29d 100644
--- a/ndn-cpp/name.hpp
+++ b/ndn-cpp/name.hpp
@@ -39,7 +39,7 @@
      * @param value Pointer to the value byte array.
      * @param valueLen Length of value.
      */
-    Component(unsigned char *value, unsigned int valueLen) 
+    Component(const unsigned char *value, unsigned int valueLen) 
     : value_(value, value + valueLen)
     {
     }
@@ -124,7 +124,7 @@
   /**
    * Add a new component, copying from value of length valueLength.
    */
-  void addComponent(unsigned char *value, unsigned int valueLength) {
+  void addComponent(const unsigned char *value, unsigned int valueLength) {
     components_.push_back(Component(value, valueLength));
   }