Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for CPlusâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #290645 |
Post edited: Improved Formatting |
— | 9 months ago |
Suggested Edit | Post #290645 |
Suggested edit: Improved Formatting (more) |
helpful | 9 months ago |
Comment | Post #281518 |
Usually I use `memcpy()` if the length of the string is already known. This way the function does not need to constantly check for a null terminator. (more) |
— | 9 months ago |
Edit | Post #291230 | Initial revision | — | 9 months ago |
Question | — |
Can I access an array element from a pointer to an object contiguous with but outside the array? C prohibits accessing an array out of bounds even if measures were taken to ensure that what should lie outside those bounds were known: ``` struct MyStruct { int x[2]; int y, z; }; staticassert(sizeof(MyStruct) == sizeof(int[4]), "Unexpected Padding"); struct MyStruct s; ``` In the ... (more) |
— | 9 months ago |