As far as I know, there is no way to provide a default value for the
argument to the constructor A::A(char (&array)[16]) in this example.
Correct?
struct A{
A(char (&array)[16] ){
std::copy(&array[0],&array[16],&_array[0]);
}
char _array[16];
};
int main() {
char arr[16] = {0};
A a(arr);
std::cout<<a._array<<std::endl;
}
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell 16 2519
* Steven T. Hatton: As far as I know, there is no way to provide a default value for the argument to the constructor A::A(char (&array)[16]) in this example. Correct?
char z[16] = {}; struct A{ A(char (&array)[16] ){
A( char (&array)[16] = z )
std::copy(&array[0],&array[16],&_array[0]);
You know, names that differ only in an underscore are not visually
distinctive.
} char _array[16]; };
int main() { char arr[16] = {0}; A a(arr); std::cout<<a._array<<std::endl; }
int main() {
A a;
std::cout<<a._array<<std::endl;
}
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Alf P. Steinbach wrote: * Steven T. Hatton: As far as I know, there is no way to provide a default value for the argument to the constructor A::A(char (&array)[16]) in this example. Correct?
char z[16] = {};
Too bad I can't have that as the default operation performed on a POD class
when it's constructed. AFAIK, I can do this.
struct C { int _a; int _b; };
C c = {};
To reliably zero-initialize all the members of a POD class. But I don't see
a way to use that for the default constructor. Writing out all the members
in the initialization list can be tedious. struct A{ A(char (&array)[16] ){
A( char (&array)[16] = z )
std::copy(&array[0],&array[16],&_array[0]);
You know, names that differ only in an underscore are not visually distinctive.
Actually, I was being sloppy. Typically I will do this:
struct A{
A(char (&array_)[16] )
{std::copy(&array_[0],&array[16]_,&_array[0]);}
char _array[16];
};
Which in this case doesn't help a lot because the syntax is so busy. In
general, however, since I frequently use _member for the member
declaration, and member_ for a parameter, I'm conditioned to look for them.
It works fairly well. The only symbol that really causes me much problem
is '#'. } char _array[16]; };
int main() { char arr[16] = {0}; A a(arr); std::cout<<a._array<<std::endl; }
int main() { A a; std::cout<<a._array<<std::endl; }
Interestingly, if the parameter is not const it won't accept a const char[]
for z, but as far as I can tell, z and A::_array are two distinct objects,
so z would never be modified as a result of that initialization. Typically
the parameter to the constructor should probably be const anyway. I also
found that I can make the default initializer a static member, which
satisfies my desire for proper containment.
This code show some behavior that was not obvious from looking at the
syntax.
#include <iostream>
#include <string>
std::string s("surprise!");
class A {
static const char s_Z[16];
public:
A(const char (&array_)[16] = s_Z ) {
std::copy(&array_[0],&array_[16],&_array[0]);
}
void surprise() { std::copy(&s[0],&s[s.size()],&_array[0]); }
char _array[16];
};
const char A::s_Z[16] = {'1','2','3','4','5','6','7','8','9'
,'A','B','C','D','E','F','\0'};
char z[16] = {};
struct B {
B( const char (&array_)[16] = z ) {
std::copy(&array_[0],&array_[16],&_array[0]);
}
char _array[16];
};
int main() {
char arr[16] = {'1','2','3','4','5','6','7','8','9'
,'a','b','c','d','e','f','\0'};
A a(arr);
A aa;
std::cout<<a._array<<std::endl;
a.surprise();
std::cout<<aa._array<<std::endl;
std::cout<<a._array<<std::endl;
std::cout<<z<<std::endl;
B b;
std::copy(&s[0],&s[s.size()],&z[0]);
B bb;
std::cout<<b._array<<std::endl;
std::cout<<bb._array<<std::endl;
}
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: [someething]
?
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Alf P. Steinbach wrote: * Steven T. Hatton: [someething]
?
This sucks!
struct Elf32_Ehdr {
Elf32_Ehdr(unsigned char (&e_ident_)[EI_NIDENT] = sc_e_ident
,Elf32_Half e_type_ = 0
,Elf32_Half e_machine_ = 0
,Elf32_Word e_version_ = 0
,Elf32_Addr e_entry_ = 0
,Elf32_Off e_phoff_ = 0
,Elf32_Off e_shoff_ = 0
,Elf32_Word e_flags_ = 0
,Elf32_Half e_ehsize_ = 0
,Elf32_Half e_phentsize_ = 0
,Elf32_Half e_phnum_ = 0
,Elf32_Half e_shentsize_ = 0
,Elf32_Half e_shnum_ = 0
,Elf32_Half e_shstrndx_ = 0)
:e_type(e_type_)
,e_machine(e_machine_)
,e_version(e_version_)
,e_entry(e_entry_)
,e_phoff(e_phoff_)
,e_shoff(e_shoff_)
,e_flags(e_flags_)
,e_ehsize(e_ehsize_)
,e_phentsize(e_phentsize_)
,e_phnum(e_phnum_)
,e_shentsize(e_shentsize_)
,e_shnum(e_shnum_)
,e_shstrndx(e_shstrndx_)
{ std::copy(&e_ident_[0],&e_ident_[EI_NIDENT],&e_ident[0]); }
static const char sc_e_ident[EI_NIDENT];//for initialization. See
Types.cpp.
unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
};
#include <sth/elf32/Types.h>
namespace sth {
namespace elf32 {
const char Elf32_Ehdr::sc_e_ident[EI_NIDENT]={};
}
}
Yes, I know I can do Elf32_Ehdr hdr = {};, but I want that to happen
automatically.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: Yes, I know I can do Elf32_Ehdr hdr = {};, but I want that to happen automatically.
Still not sure what you mean.
Is your question: how do I zero a POD member in a constructor initializer
list?
In that case, for POD member m and class C, "C(): m() {}".
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Alf P. Steinbach wrote: * Steven T. Hatton: Yes, I know I can do Elf32_Ehdr hdr = {};, but I want that to happen automatically.
Still not sure what you mean.
Is your question: how do I zero a POD member in a constructor initializer list?
In that case, for POD member m and class C, "C(): m() {}".
No, that wasn't the question. But that certainly is cleaner than what I
showed. I just figured if I was going to bother writing the initializers,
I might as well make them more useful. My question is how do I accomplish
what the following does, but with something as simple as Elf32_Ehdr eh={}:
// ELF file header
struct Elf32_Ehdr {
Elf32_Ehdr():e_type ()
,e_machine ()
,e_version ()
,e_entry ()
,e_phoff ()
,e_shoff ()
,e_flags ()
,e_ehsize ()
,e_phentsize()
,e_phnum ()
,e_shentsize()
,e_shnum ()
,e_shstrndx ()
{}
unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
};
Actually, what's above is probably the closest you can get to what I want.
It seems like it would be relatively trivial to provide some syntactic
legerdemain to get the compiler to zero initialize all members by default
with one or two characters.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: Alf P. Steinbach wrote:
* Steven T. Hatton: Yes, I know I can do Elf32_Ehdr hdr = {};, but I want that to happen automatically.
Still not sure what you mean.
Is your question: how do I zero a POD member in a constructor initializer list?
In that case, for POD member m and class C, "C(): m() {}".
No, that wasn't the question. But that certainly is cleaner than what I showed. I just figured if I was going to bother writing the initializers, I might as well make them more useful. My question is how do I accomplish what the following does, but with something as simple as Elf32_Ehdr eh={}:
// ELF file header struct Elf32_Ehdr { Elf32_Ehdr():e_type () ,e_machine () ,e_version () ,e_entry () ,e_phoff () ,e_shoff () ,e_flags () ,e_ehsize () ,e_phentsize() ,e_phnum () ,e_shentsize() ,e_shnum () ,e_shstrndx () {} unsigned char e_ident[EI_NIDENT]; Elf32_Half e_type; Elf32_Half e_machine; Elf32_Word e_version; Elf32_Addr e_entry; Elf32_Off e_phoff; Elf32_Off e_shoff; Elf32_Word e_flags; Elf32_Half e_ehsize; Elf32_Half e_phentsize; Elf32_Half e_phnum; Elf32_Half e_shentsize; Elf32_Half e_shnum; Elf32_Half e_shstrndx; };
struct Elf32: Elf32_Ehdr{ Elf32(): Elf32_Ehdr() {} };
OK?
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Steven T. Hatton sade: Actually, what's above is probably the closest you can get to what I want. It seems like it would be relatively trivial to provide some syntactic legerdemain to get the compiler to zero initialize all members by default with one or two characters.
Doesn't the compiler zero-initialize (as a part of default-initializing)
every member for which no other intializer is specified?
Tobias
--
IMPORTANT: The contents of this email and attachments are confidential
and may be subject to legal privilege and/or protected by copyright.
Copying or communicating any part of it to others is prohibited and may
be unlawful.
* Tobias Blomkvist: Steven T. Hatton sade:
Actually, what's above is probably the closest you can get to what I want. It seems like it would be relatively trivial to provide some syntactic legerdemain to get the compiler to zero initialize all members by default with one or two characters.
Doesn't the compiler zero-initialize (as a part of default-initializing) every member for which no other intializer is specified?
Short answer: No.
Longer answer: it depends on how and where the instance is created, e.g.
auto T o;
will not initialize o when T is a POD.
Even longer answer: the rules in C++98 were not properly implemented by all
compilers, and in C++03 new rules (value-initialization) were added, so it's
rather complex; it's not a good idea to count on the standard's rules here.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Alf P. Steinbach wrote: * Steven T. Hatton: Alf P. Steinbach wrote:
> * Steven T. Hatton: >> Yes, I know I can do Elf32_Ehdr hdr = {};, but I want that to happen >> automatically. > > Still not sure what you mean. > > Is your question: how do I zero a POD member in a constructor > initializer list? > > In that case, for POD member m and class C, "C(): m() {}".
No, that wasn't the question. But that certainly is cleaner than what I showed. I just figured if I was going to bother writing the initializers, I might as well make them more useful. My question is how do I accomplish what the following does, but with something as simple as Elf32_Ehdr eh={}:
// ELF file header struct Elf32_Ehdr { Elf32_Ehdr():e_type () ,e_machine () ,e_version () ,e_entry () ,e_phoff () ,e_shoff () ,e_flags () ,e_ehsize () ,e_phentsize() ,e_phnum () ,e_shentsize() ,e_shnum () ,e_shstrndx () {} unsigned char e_ident[EI_NIDENT]; Elf32_Half e_type; Elf32_Half e_machine; Elf32_Word e_version; Elf32_Addr e_entry; Elf32_Off e_phoff; Elf32_Off e_shoff; Elf32_Word e_flags; Elf32_Half e_ehsize; Elf32_Half e_phentsize; Elf32_Half e_phnum; Elf32_Half e_shentsize; Elf32_Half e_shnum; Elf32_Half e_shstrndx; };
struct Elf32: Elf32_Ehdr{ Elf32(): Elf32_Ehdr() {} };
OK?
That only works if I've already defined Elf32_Ehdr as shown above, correct?
IOW, it requires the member initialization list. I can and will experiment
with it, but that won't tell me what the Standard actually specifies.
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: struct Elf32: Elf32_Ehdr{ Elf32(): Elf32_Ehdr() {} };
OK? That only works if I've already defined Elf32_Ehdr as shown above, correct?
No, it works if you _have not_ defined a constructor.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Alf P. Steinbach wrote: * Steven T. Hatton: > struct Elf32: Elf32_Ehdr{ Elf32(): Elf32_Ehdr() {} }; > > OK? > That only works if I've already defined Elf32_Ehdr as shown above, correct?
No, it works if you _have not_ defined a constructor.
Are you saying my compiler's wrong? Can you provide clause and paragraph?
I'd like to run this past the GCC folks.
/home/hattons/code/c++/scratch/zero-initialize $ cat main.cpp
#include <iostream>
// Platform specific definitions.
typedef unsigned long Elf32_Addr;
typedef unsigned short Elf32_Half;
typedef unsigned long Elf32_Off;
typedef signed long Elf32_Sword;
typedef unsigned long Elf32_Word;
const unsigned EI_NIDENT(16);
struct Elf32_Ehdr_base {
unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
};
// ELF file header
struct Elf32_Ehdr: Elf32_Ehdr_base
{ Elf32_Ehdr():Elf32_Ehdr_base(){} };
int main(){
Elf32_Ehdr eh;
for(size_t i = 0; i < EI_NIDENT; ++i){ std::cout<<int(eh.e_ident[i])<<"
"; }
std::cout<<"\n"
<<eh.e_type<<"\n"
<<eh.e_machine<<"\n"
<<eh.e_version<<"\n"
<<eh.e_entry<<"\n"
<<eh.e_phoff<<"\n"
<<eh.e_shoff<<"\n"
<<eh.e_flags<<"\n"
<<eh.e_ehsize<<"\n"
<<eh.e_phentsize<<"\n"
<<eh.e_phnum<<"\n"
<<eh.e_shentsize<<"\n"
<<eh.e_shnum<<"\n"
<<eh.e_shstrndx<<std::endl;
}
/home/hattons/code/c++/scratch/zero-initialize $ g++ -ozero-init main.cpp
/home/hattons/code/c++/scratch/zero-initialize $ ./zero-init
46 133 4 8 16 42 15 64 136 207 255 191 217 139 4 8
0
0
134520288
3221213080
134514289
1074749732
1074735632
53176
49151
35713
2052
28660
16385
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
Steven T. Hatton wrote:
[...]
This seems to work, and isn't too terribly convoluted.
#include <iostream>
// Platform specific definitions.
typedef unsigned long Elf32_Addr;
typedef unsigned short Elf32_Half;
typedef unsigned long Elf32_Off;
typedef signed long Elf32_Sword;
typedef unsigned long Elf32_Word;
const unsigned EI_NIDENT(16);
struct Elf32_Ehdr_base {
unsigned char e_ident[EI_NIDENT];
Elf32_Half e_type;
Elf32_Half e_machine;
Elf32_Word e_version;
Elf32_Addr e_entry;
Elf32_Off e_phoff;
Elf32_Off e_shoff;
Elf32_Word e_flags;
Elf32_Half e_ehsize;
Elf32_Half e_phentsize;
Elf32_Half e_phnum;
Elf32_Half e_shentsize;
Elf32_Half e_shnum;
Elf32_Half e_shstrndx;
static const Elf32_Ehdr_base Z;
};
const Elf32_Ehdr_base Elf32_Ehdr_base::Z = {};
// ELF file header
struct Elf32_Ehdr: Elf32_Ehdr_base
{ Elf32_Ehdr():Elf32_Ehdr_base(Elf32_Ehdr::Z){} };
int main(){
Elf32_Ehdr eh;
for(size_t i = 0; i < EI_NIDENT; ++i){ std::cout<<int(eh.e_ident[i])<<"
"; }
std::cout<<"\n"
<<eh.e_type<<"\n"
<<eh.e_machine<<"\n"
<<eh.e_version<<"\n"
<<eh.e_entry<<"\n"
<<eh.e_phoff<<"\n"
<<eh.e_shoff<<"\n"
<<eh.e_flags<<"\n"
<<eh.e_ehsize<<"\n"
<<eh.e_phentsize<<"\n"
<<eh.e_phnum<<"\n"
<<eh.e_shentsize<<"\n"
<<eh.e_shnum<<"\n"
<<eh.e_shstrndx<<std::endl;
}
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: Alf P. Steinbach wrote:
* Steven T. Hatton: > struct Elf32: Elf32_Ehdr{ Elf32(): Elf32_Ehdr() {} }; > > OK? > That only works if I've already defined Elf32_Ehdr as shown above, correct? No, it works if you _have not_ defined a constructor.
Are you saying my compiler's wrong?
Assuming your example (snipped) is correct your compiler is indeed
non-conforming.
Can you provide clause and paragraph?
In C++98, first §12.6.2/3 "if the expression list of the mem-initializer is
omitted, the base class or member subobject is default-initialized", then
§8.5/5, for your case, a POD, "the storage for the object is
zero-initialized". In C++03 I guess there might be a small detour via
"value-initialized". Anyway, the effect is that all members are zeroed.
I'd like to run this past the GCC folks.
First make sure you have the latest version of the compiler, and that that
is indeed the compiler you actually used. But if so, then yes, good idea.
They have a special web-page for reporting such things -- and it works.
[snipped example]
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Steven T. Hatton wrote: Steven T. Hatton wrote:
[...]
This seems to work, and isn't too terribly convoluted.
#include <iostream>
// Platform specific definitions. typedef unsigned long Elf32_Addr; typedef unsigned short Elf32_Half; typedef unsigned long Elf32_Off; typedef signed long Elf32_Sword; typedef unsigned long Elf32_Word;
const unsigned EI_NIDENT(16);
struct Elf32_Ehdr_base { unsigned char e_ident[EI_NIDENT]; Elf32_Half e_type; Elf32_Half e_machine; Elf32_Word e_version; Elf32_Addr e_entry; Elf32_Off e_phoff; Elf32_Off e_shoff; Elf32_Word e_flags; Elf32_Half e_ehsize; Elf32_Half e_phentsize; Elf32_Half e_phnum; Elf32_Half e_shentsize; Elf32_Half e_shnum; Elf32_Half e_shstrndx; static const Elf32_Ehdr_base Z; }; const Elf32_Ehdr_base Elf32_Ehdr_base::Z = {};
// ELF file header struct Elf32_Ehdr: Elf32_Ehdr_base { Elf32_Ehdr():Elf32_Ehdr_base(Elf32_Ehdr::Z){} };
int main(){ Elf32_Ehdr eh; for(size_t i = 0; i < EI_NIDENT; ++i){ std::cout<<int(eh.e_ident[i])<<" "; } std::cout<<"\n" <<eh.e_type<<"\n" <<eh.e_machine<<"\n" <<eh.e_version<<"\n" <<eh.e_entry<<"\n" <<eh.e_phoff<<"\n" <<eh.e_shoff<<"\n" <<eh.e_flags<<"\n" <<eh.e_ehsize<<"\n" <<eh.e_phentsize<<"\n" <<eh.e_phnum<<"\n" <<eh.e_shentsize<<"\n" <<eh.e_shnum<<"\n" <<eh.e_shstrndx<<std::endl; }
HOWEVER..., when I g++ -o test *.cpp -W I get a zillion warnings such as
"missing initializer for member ?sth::elf32::Elf32_Ehdr_base::e_ident?". Is
my compiler right or wrong on this one?
--
If our hypothesis is about anything and not about some one or more
particular things, then our deductions constitute mathematics. Thus
mathematics may be defined as the subject in which we never know what we
are talking about, nor whether what we are saying is true.-Bertrand Russell
* Steven T. Hatton: HOWEVER..., when I g++ -o test *.cpp -W I get a zillion warnings such as "missing initializer for member ?sth::elf32::Elf32_Ehdr_base::e_ident?". Is my compiler right or wrong on this one?
The compiler is free to issue any warnings whatsoever, including "Warning:
identifier includes politically incorrect term(s)".
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: earl |
last post by:
class temp
{
public:
temp();
foo(char, char, char*);
private:
char matrix;
};
temp::foo(char p, char o, char m = matrix )
|
by: Steven T. Hatton |
last post by:
I mistakenly set this to the comp.std.c++ a few days back. I don't believe
it passed the moderator's veto - and I did not expect or desire anything
different. But the question remains:
ISO/IEC...
|
by: Gary |
last post by:
Hi,
I am a Chinese student, I have a problem with the following code
//The follwing code in StaticSearch.h:
//
template <class Type> class dataList;
//
template <class Type> class Node ...
|
by: danilo.horta |
last post by:
Hi guys
I'm trying to accomplish a slightly difficult task. I think it's more
easy to explain trought an unworking code:
template<class T, size_t numDim> VecBasis {/*...*/};
typedef...
|
by: utab |
last post by:
Dear all,
Can somebody direct me to some resources on the subject or explain the
details in brief? I checked the FAQ but could not find or maybe missed.
Regards,
|
by: sujilc |
last post by:
This question seems to be silly. Can ony one figure out the default
functions implemented by compiler when we decalre a class like
class A
{
}
According to me this declaration will define...
|
by: Jack |
last post by:
I have a class called "Base". This class has a protected member
variable "m_base" which can be retrieved using the public member
function "GetBaseMember". "m_base" is initialized to "1" and is...
|
by: aaragon |
last post by:
Hello all. I have a simple question that seems trivial but I can't
make it to work. I have a class that takes as a template argument,
another class. The idea is as follows:
#include...
|
by: interX |
last post by:
Hi
I'm new in VC++ and have a question to generics. I have a generic
class, which contains an array of the generic type. This array I can
pin and then I would like to get an unmanaged pointer to...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |