Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #define kOID "1.3.6.1.4.1.1.1.2.4.0"
  2.  
  3. char* p = kOID;
  4.  
  5. const char* p = kOID;
  6.  
  7. char* p = kOID;
  8. char* const p = kOID; // compilation error if you change the pointer
  9. const char* p = kOID; // compilation error if you change the pointed data
  10. const char* const p = kOID; // compilation error if you change either one of them
  11.  
  12. const char *pointer = kOID;
  13.  
  14. const char *pointer = "1.3.6.1.4.1.1.1.2.4.0";
  15.  
  16. #include <header.h>
  17.  
  18. char * s = kOID;
  19.  
  20. const char * s = kOID;
  21.  
  22. a.c: In function β€˜main’:
  23. a.c:10:5: error: assignment of read-only location β€˜*s’
  24.  
  25. const char some_string[] = kOID;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement