Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- int main()
- {
- // size_t
- // It is a data type that is guarenteed to hold an array index
- // Mostly used for counting something that cannot be negative
- // Can be used with strlen() "string length"
- char name[5] = { 'n','a','m','e' };
- size_t size = strlen(name);
- std::cout << size;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement