Go Back   Velocity Reviews > Newsgroups > C++
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

C++ - Differences between default initialisation

 
Thread Tools Search this Thread
Old 11-01-2009, 10:48 AM   #1
Default Differences between default initialisation


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
  Reply With Quote
Old 11-01-2009, 02:43 PM   #2
Bo Persson
 
Posts: n/a
Default Re: Differences between default initialisation
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
  Reply With Quote
Old 11-01-2009, 02:49 PM   #3
Victor Bazarov
 
Posts: n/a
Default Re: Differences between default initialisation
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
  Reply With Quote
Old 11-03-2009, 12:41 AM   #4
paperab
 
Posts: n/a
Default Re: Differences between default initialisation
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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46