sizeof
Is return an operator or a function?
This is too basic I think, but how do both of these work? return true;// 1 and return (true); // 2 Similar: sizeof, exit[详细]
2022-12-29 15:45 分类:问答Simple 'database' in c++
My task was to create pseudodatabase in c++. There are 3 tables given, that store name(char*), age(int), and sex (bool). Write a program allowing to :[详细]
2022-12-29 14:52 分类:问答Interop c# using a "long" from c++
On my System: sizeof(long) in c++开发者_运维知识库 is 4 aka 32bits sizeof(long) in c# is 8 aka 64 bits[详细]
2022-12-29 13:51 分类:问答sizeof derived already from base
is it possible to return the sizeof a derived class already from base class/struct? imho the size of a class is a kind of property of itself, like the weight of a human being. But I don\'t want to wr[详细]
2022-12-28 09:01 分类:问答memcpy(), what should the value of the size parameter be?
I want to copy an int array to another int array. They use the same define for length so they\'ll always be of the same length.[详细]
2022-12-27 10:14 分类:问答Can sizeof return 0 (zero)
Is it possible for the sizeof operator to ever return 0 (z开发者_如何学Cero) in C or C++?If it is possible, is it correct from a standards point of view?In C++ an empty class or struct has a sizeof at[详细]
2022-12-26 13:00 分类:问答Checking the sizeof an integer type in the preprocessor
开发者_高级运维How can I check the size of an unsigned in the preprocessor under g++? sizeof is out of the question since it is not defined when during preprocessing.This may not be the most elegant m[详细]
2022-12-26 00:46 分类:问答sizeof continues to return 4 instead of actual size
#include <iostream> using namespace std; int main() { cout << \"Do you need to encrypt or decrypt?\" << endl;[详细]
2022-12-25 06:52 分类:问答sizeof abuse : get the size of a const table
When declaring a const table, it is possible to get the size of th开发者_如何学Goe table using sizeof. However,[详细]
2022-12-24 23:12 分类:问答Questions on usages of sizeof
Question 1 I have a struct like, struct foo { int a; char c; }; When I say sizeof(foo), I am getting 8 on my machine. As per my understanding, 4 bytes for int, 1 byte for char and 3 bytes for padd[详细]
2022-12-24 18:57 分类:问答