sizeof
Strange case while using the sizeof() operator in C
I was testing the use of sizeof operator in C/C++ with this code: #include <ctype.h>/* Character types*/[详细]
2023-04-11 21:13 分类:问答C++ Derived polymorphic class - does it contain an entire instance of Base, including a vptr?
Say we have Class A { public: int 开发者_运维知识库_i; virtual int getI(); }; class B : public A { public:[详细]
2023-04-08 11:27 分类:问答In gdb sizeof(Apple::record_) is zero. But It runs well
I encounterd a very strange g++ problem. The output of the flowing program is \"24 8 3\", All things seems ok. But when I use gdb, to print sizeof(Apple::record_), it turns out to be 0. My gcc versio[详细]
2023-04-07 22:49 分类:问答sizeof on argument
Even with int foo(char str[]); which will take in an array initialized to a string literal sizeof doesn\'t work. I was asked to do something like strlen and the approach I want to take is to use sizeo[详细]
2023-04-06 09:25 分类:问答wchar_t array passed into function
I am making a C program on windows using visual studio 2010. I am passing a wchar_t array to a function.[详细]
2023-04-06 09:22 分类:问答sizeof operator returning strange result
language is C with gcc compiler if i make a struct like so struct test { char item_1[2]; char item_3[4]; char item_4[2];[详细]
2023-04-04 15:15 分类:问答Why does 'sizeof' give wrong measurement? [duplicate]
This question already has answers here: Closed 11 years ago. Possible Duplicate: struct sizeof result not expected[详细]
2023-04-03 18:59 分类:问答how to get byte size of type in generic list?
I have this generic list and I want to get the byte size of the type like if T is string or int etc., I tried both ways as written in getByteSize(), and just to let you know I am using only one way at[详细]
2023-04-02 00:02 分类:问答HTML document + js + images size in kb
I want to be able to find out how long a page will take to download. I can calculate how long it will 开发者_JAVA技巧take when I know the size of the page including html page, javascript and images (i[详细]
2023-04-01 00:35 分类:问答"Invalid application of 'sizeof' to interface 'Fraction' in non-fragile ABI" in Objective-C
I\'m studying Steven Kochan\'s \"Programming in Objective-C 2.0\". We created a Fraction object with two int instance variables. Later in the book Kochan uses the sizeof statement on a Fraction object[详细]
2023-03-31 01:34 分类:问答