![]() |
|
|
|||||||
![]() |
C++ - Differences between default initialisation |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello
In C++ global and static variables (primitive) are zero initialised. But member and local variables are not. Is this standard for other languages? Why? Angus Angus |
|
|
|
|
#2 |
|
Posts: n/a
|
Angus wrote:
> Hello > > In C++ global and static variables (primitive) are zero initialised. > But member and local variables are not. Is this standard for other > languages? Why? > > Angus This is all inherited from the C language. Old C code, compiled as C++, should behave the way it used to - especially performance-wise. Bo Persson Bo Persson |
|
|
|
#3 |
|
Posts: n/a
|
Angus wrote:
> In C++ global and static variables (primitive) are zero initialised. > But member and local variables are not. Is this standard for other > languages? How TF should we know? Ask in "other languages" newsgroups. V -- Please remove capital 'A's when replying by e-mail I do not respond to top-posted replies, please don't ask Victor Bazarov |
|
|
|
#4 |
|
Posts: n/a
|
On Nov 1, 2:49*pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> Angus wrote: > > In C++ global and static variables (primitive) are zero initialised. > > But member and local variables are not. *Is this standard for other > > languages? > > How TF should we know? *Ask in "other languages" newsgroups. > > V > -- > Please remove capital 'A's when replying by e-mail > I do not respond to top-posted replies, please don't ask Does exist other languages ? paperab |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Set default problem | Robert Bristow | Windows 64bit | 6 | 10-09-2008 08:50 AM |
| no default email program help needed | Casey | Computer Support | 9 | 07-13-2005 11:23 AM |
| Default email in outlook express | borgmaster | Computer Support | 2 | 04-12-2005 10:49 PM |
| An interesting concept - Somebody's watching you | johnyreb | Computer Support | 1 | 03-06-2005 02:42 PM |
| Setting OE as default. | soup | Computer Support | 3 | 01-25-2005 07:49 PM |