f



C++11 allows static member initialisation

I have this:

$ more static-initialisers.cpp=20
class Simple
{
	static int mCounter =3D 0;
};
$ g++-4.6.3 -std=3Dc++0x -c static-initialisers.cpp
static-initialisers.cpp:3:24: error: ISO C++ forbids in-class
initialization of non-const static member =E2=80=98mCounter=E2=80=99

Which version of G++ allows this? The docs for 4.7.x doesn't say if it
is allowed.

I know I can simply do:

int Simple::mCounter =3D 0

to get around this though.=20
--=20
Tactical Nuclear Kittens

0
alex.buell1 (151)
8/5/2012 10:11:40 PM
comp.lang.c++ 49423 articles. 6 followers. Post Follow

12 Replies
497 Views

Similar Articles

[PageSpeed] 51

On 06/08/2012 00:11, Single Stage to Orbit wrote:
> I have this:
>
> $ more static-initialisers.cpp
> class Simple
> {
> 	static int mCounter = 0;
> };
> $ g++-4.6.3 -std=c++0x -c static-initialisers.cpp
> static-initialisers.cpp:3:24: error: ISO C++ forbids in-class
> initialization of non-const static member ‘mCounter’
>
> Which version of G++ allows this?

None probably.

> The docs for 4.7.x doesn't say if it  is allowed.

With --std=C++0x, GCC obeys to the C++11 standard (§ 9.4.2):

"
The definition for a static data member shall appear in a namespace
scope enclosing the member’s class definition. In the definition at 
namespace scope, the name of the static data member shall be qualified 
by its class name using the :: operator. The initializer expression in 
the definition of a static data member is in the scope of its class 
(3.3.7).

[ Example:

class process {
	static process* run_chain;
	static process* running;
};
process* process::running = get_main();
process* process::run_chain = running;
"

0
luca.risolia (195)
8/5/2012 11:20:41 PM
Single Stage to Orbit <alex.buell@munted.eu> wrote:
> class Simple
> {
>        static int mCounter = 0;
> };
> $ g++-4.6.3 -std=c++0x -c static-initialisers.cpp
> static-initialisers.cpp:3:24: error: ISO C++ forbids in-class
> initialization of non-const static member ???mCounter???
> 
> Which version of G++ allows this? The docs for 4.7.x doesn't say if it
> is allowed.

Why do you assume that it's allowed?

I think you are confusing it with (non-static) in-class member
initialization. That's a different thing. (It's basically a shortcut
to writing the initialization into the constructor of the class. Static
variables are not initialized in the constructor.)
0
nospam270 (2948)
8/6/2012 7:24:11 AM
Single Stage to Orbit <alex.buell@munted.eu> wrote in 
news:1344204700.5930.12.camel@lithium.local.net:

> I have this:
> 
> $ more static-initialisers.cpp 
> class Simple
> {
>      static int mCounter = 0;
> };

Only const static data members can be initialized in-class. For a mutable 
data member the identity of the variable is important, so it must be placed 
in a specific compilation unit. The compiler cannot guess in which 
compilation unit it should appear. It cannot select some random one as it 
is not even aware if you are compiling the corresponding library itself 
(which should contain the variable) or some client code (which should not).

As a separate definition is needed anyway, it seems logical to put the 
initialization value also there. In principle one could have it in-class 
instead (similar to the default values for function parameters), but this 
would still not relieve you from writing the definition line in some 
compilation unit.

Cheers
Paavo
0
myfirstname1 (763)
8/6/2012 7:36:46 AM
On Mon, 2012-08-06 at 07:24 +0000, Juha Nieminen wrote:
> Single Stage to Orbit <alex.buell@munted.eu> wrote:
> > class Simple
> > {
> >        static int mCounter =3D 0;
> > };
> > $ g++-4.6.3 -std=3Dc++0x -c static-initialisers.cpp
> > static-initialisers.cpp:3:24: error: ISO C++ forbids in-class
> > initialization of non-const static member ???mCounter???
> >=20
> > Which version of G++ allows this? The docs for 4.7.x doesn't say if
> it
> > is allowed.
>=20
> Why do you assume that it's allowed?

Because "Professional C++ 2nd Edition" says that with C++11 I can do
this. Evidently it is wrong.

> I think you are confusing it with (non-static) in-class member
> initialization. That's a different thing. (It's basically a shortcut
> to writing the initialization into the constructor of the class.
> Static variables are not initialized in the constructor.)=20

Or has the standard changed to disallow static in-class member
initialization?=20
--=20
Tactical Nuclear Kittens

0
alex.buell1 (151)
8/6/2012 8:13:33 AM
Paavo Helde <myfirstname@osa.pri.ee> wrote:
> Only const static data members can be initialized in-class. For a mutable 
> data member the identity of the variable is important, so it must be placed 
> in a specific compilation unit.

Btw, at some point in the distant past, gcc (a really old version of it,
obviously) demanded that even const static class variables be defined in
a compilation unit. (Ostensibly so you can create pointers pointing to
that variable.)

What exactly is the current official status of this? Does the standard
explicitly say that const static class variables do not need to be
defined in a compilation unit? Why was gcc demanding it at one point?
(Was this a concept before the 98 standard came out? Was it in some
standard draft? Was it in the standard but got changed? Was this simply
something gcc-exclusive?)

What happens if you take the address of a const static class variable?
(Error? Malformed? Implementation-defined? UB? Must have definition in
this case? Something else?)
0
nospam270 (2948)
8/6/2012 8:38:35 AM
Paavo Helde <myfirstname@osa.pri.ee> wrote:
> The compiler cannot guess in which compilation unit it should appear.

It doesn't seem to be a problem with static variables in a templated
class...
0
nospam270 (2948)
8/6/2012 8:40:11 AM
Single Stage to Orbit <alex.buell@munted.eu> wrote:
>> I think you are confusing it with (non-static) in-class member
>> initialization. That's a different thing. (It's basically a shortcut
>> to writing the initialization into the constructor of the class.
>> Static variables are not initialized in the constructor.) 
> 
> Or has the standard changed to disallow static in-class member
> initialization? 

Does the new standard really say that you can now initialize static
members in their declaration?

Note that non-static member initialization in their declaration is
not *actual* initialization per se. It's just a shorthand that can be used
instead of writing the actual initialization in the constructor of the class.
(Note that when you write "int i = 5;" as class member, that variable
might not actually be initialized with the value 5. A constructor my
override that initialization with something else in its initializer
list. The initialization to 5 will be autogenerated only if there's
no explicit initialization in the initialization list of the constructor.)

Static members are not initialized in constructors, and hence it's
a completely different situation.
0
nospam270 (2948)
8/6/2012 9:07:24 AM
On 06.08.2012 10:38, Juha Nieminen wrote:
> Paavo Helde <myfirstname@osa.pri.ee> wrote:
>> Only const static data members can be initialized in-class. For a mutable
>> data member the identity of the variable is important, so it must be placed
>> in a specific compilation unit.
>
> Btw, at some point in the distant past, gcc (a really old version of it,
> obviously) demanded that even const static class variables be defined in
> a compilation unit. (Ostensibly so you can create pointers pointing to
> that variable.)
>
> What exactly is the current official status of this? Does the standard
> explicitly say that const static class variables do not need to be
> defined in a compilation unit? Why was gcc demanding it at one point?
> (Was this a concept before the 98 standard came out? Was it in some
> standard draft? Was it in the standard but got changed? Was this simply
> something gcc-exclusive?)

It's still a bit fuzzy, but the intent appears to be that if the address 
is never required, then it's A OK to not have definition.

As I recall it's still specified in the One Definition Rule.


> What happens if you take the address of a const static class variable?

Then you need a definition.

If you want such a definition in a header, it can be placed in base 
class template.


Cheers & hth.,

- Alf

0
usenet30 (890)
8/6/2012 9:25:01 AM
On 8/6/2012 5:07 AM, Juha Nieminen wrote:
> Single Stage to Orbit <alex.buell@munted.eu> wrote:
>>> I think you are confusing it with (non-static) in-class member
>>> initialization. That's a different thing. (It's basically a shortcut
>>> to writing the initialization into the constructor of the class.
>>> Static variables are not initialized in the constructor.)
>>
>> Or has the standard changed to disallow static in-class member
>> initialization?
>
> Does the new standard really say that you can now initialize static
> members in their declaration?

Just to remind the OP, const static members are allowed to be 
initialised in the class definition, and that hasn't changed in the new 
Standard; *some* compilers *extend* this behavior to include non-const 
static data members, but let's emphasize that it is *an extension*.

> [..]

V
-- 
I do not respond to top-posted replies, please don't ask
0
v.bazarov (912)
8/6/2012 12:24:08 PM
Juha Nieminen <nospam@thanks.invalid> wrote in news:jvnvtb$vg4$2
@speranza.aioe.org:

> Paavo Helde <myfirstname@osa.pri.ee> wrote:
>> The compiler cannot guess in which compilation unit it should appear.
> 
> It doesn't seem to be a problem with static variables in a templated
> class...
> 

Experimentation shows otherwise:

template<typename T>
struct A {
	static int bb;
	void f() {bb=42;}
};


int main() {
	A<int> x;
	x.f();
}

MSVC2010: 

test.obj : error LNK2001: unresolved external symbol "public: static int 
A<int>::bb" (?bb@?$A@H@@2HA)
K:\Test\consoletest\x64\Debug\consoletest.exe : fatal error LNK1120: 1 
unresolved externals

gcc 4.3.2:
/tmp/ccIJYg9h.o: In function `A<int>::f()':
test1.cpp:(.text._ZN1AIiE1fEv[A<int>::f()]+0xa): undefined reference to 
`A<int>::bb'
collect2: ld returned 1 exit status

0
myfirstname1 (763)
8/6/2012 3:06:27 PM
Paavo Helde <myfirstname@osa.pri.ee> wrote:
> Juha Nieminen <nospam@thanks.invalid> wrote in news:jvnvtb$vg4$2
> @speranza.aioe.org:
> 
>> Paavo Helde <myfirstname@osa.pri.ee> wrote:
>>> The compiler cannot guess in which compilation unit it should appear.
>> 
>> It doesn't seem to be a problem with static variables in a templated
>> class...
>> 
> 
> Experimentation shows otherwise:
> 
> template<typename T>
> struct A {
>        static int bb;
>        void f() {bb=42;}
> };
> 
> 
> int main() {
>        A<int> x;
>        x.f();
> }

I didn't say that you don't need to define the static variable. I meant
to say that you can define it right there in the header, and it doesn't
seem to cause any problem for the compiler to decide "in which compilation
unit it should appear"

My point was that the argument that the compiler needs to know the exact
compilation unit where to put the static variable is not valid because
templated classes demonstrate otherwise.
0
nospam270 (2948)
8/6/2012 4:31:08 PM
Juha Nieminen <nospam@thanks.invalid> wrote in
news:jvorgc$3p6$1@speranza.aioe.org: 

> Paavo Helde <myfirstname@osa.pri.ee> wrote:
>> Juha Nieminen <nospam@thanks.invalid> wrote in news:jvnvtb$vg4$2
>> @speranza.aioe.org:
>> 
>>> Paavo Helde <myfirstname@osa.pri.ee> wrote:
>>>> The compiler cannot guess in which compilation unit it should
>>>> appear. 
>>> 
>>> It doesn't seem to be a problem with static variables in a templated
>>> class...
>>> 
>> 
>> Experimentation shows otherwise:
[...]
 
> I didn't say that you don't need to define the static variable. I
> meant to say that you can define it right there in the header, and it
> doesn't seem to cause any problem for the compiler to decide "in which
> compilation unit it should appear"
> 
> My point was that the argument that the compiler needs to know the
> exact compilation unit where to put the static variable is not valid
> because templated classes demonstrate otherwise.

Ok, I see I misunderstand you earlier. Yes, with templates the linker 
discards all but one of the copies. If you have a statically linked app, 
then this is probably fine (modulo static initialization order problems I 
guess). However, in case of dynamic link libraries one can easily end up 
with multiple variables in different DLL-s. This can be a problem at 
least in Windows. Of course, the C++2003 standard did not consider DLL-s 
at all, it would be interesting to know if and how this problem is 
addressed in the new standard. 

Cheers
Paavo
0
myfirstname1 (763)
8/6/2012 5:32:03 PM
Reply:

Similar Artilces:

Better C/C++ Than C/C++?
I am looking for a good systems programming language that can be used instead of C/C++. My qualifications for the language are: * mature compiler(s) that produce native-code binaries (for Windows) * open source - preferable, but not 100% necessary Thanks, Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) Ocaml, D, cyclone, Eiffel, Beta > * open source - preferable, but not 100% necessary what's wrong with using C? Friedrich > what's wrong with using C? Too low level, no built-in garbage collection. -- Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: >> what's wrong with using C? > > Too low level, Well the Smalltalk people say, have a small language and a big library. I assume C's library status beyond that of Smalltalk. > no built-in garbage collection. Use the Boehm Weisser GC. Friedrich "Kevin Albrecht" <kevin@albrecht.net> wrote in message news:<2TiYb.237892$rj7.1641209@twister.tampabay.rr.com>... > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) > ...

C/C++ in matlab and matlab in C/C++ ?
Is it possible to read C/C++ code in matlab and the other way around too? Hi, as long as C or C++ are written in text files you can edit them in the matlab editor. To see the special character of C or C++ coding language, in the editor go to menus: file>preferences>Edito/Debugger>language and on popup "Language" select "C/C++". This does not allow you to run the C/C++ code, just to view it i nicer way... regards, chris saneman <asdfsdf@asd.com> wrote in message <frl846 $f8i$2@news.net.uni-c.dk>... > Is it possible to read C/C...

C/C++ in MATALB or MATLAB in C/C++?
Hi I've been asking on the net how to use MEX properly so that I can use C/C++ in MATLAB, but information is not forthcoming. There seems to be a lot on using MATLAB in C/C++ but not the other way around. I understand Mathworks is trying very hard to sell the Matlab Compiler, but even so, why is it SO hard to get information about MEX? Or is it that I've missed something very fundamental, meaning that I'm struggling over something that is actually quite easy? Any thoughts and info would be great. Thanks BullDog BullDog wrote: > Hi > > I've been asking on the net ...

C,, C++, Java, C#
I come from C,C++,Java and C#. What can SmallTalk do for me and for what cost? Regarding the Squeak thing, it's interesting though confusing. Is it an IDE? Why are the menus so wacky? "DM McGowan II" <nospam@nospam.net> wrote in message news:PLednX2vnLd11IncRVn-rA@comcast.com... > I come from C,C++,Java and C#. What can SmallTalk do for me ...? Ask not what Smalltalk can do for, but what can you do with Smalltalk. :-) In very few words, it significantly reduces time to market, while enhancig the development experience. This is because: 1. It manages the memory for you, so you don't have to allocate/deallocate all the time (the source of some of the most nasty bugs in C). Java and C# learnt that feature from ST. 2. It has single inheritance. 3. All the development is in a single file, called the image, so you don't have to fish for where did you put that missing class. Yet, you don't have to go through thousands of lines of code to find the method you wrote three months ago. 4. It's the language for which it's easier to work within the Agile methodologies. 5. It's strongly typed without being unnecessarily redundant. 6. It's "wacky" interface releases you from the need to use curlys. 7. It comes with a huge library, so you don't need to reinvent the wheel as much. 8. It's debugger is highly integrated and friendly, so the experience of findin...

C, C++ and C# Forums
Throne Software has opened up C, C++ and C# Forums at: http://www.thronesoftware.com/forum/ Join us! ...

c,c++,obj-c
Of the 3 languages titled in this post is c++ older than obj-c ? Would someone experienced in C be able to dive right into C++ rather than obj-c ? Java is out for me now except applet programming I think I'm going to go with just C and C++. Bill Bill Cunningham wrote: > Of the 3 languages titled in this post is c++ older than obj-c ? Why does that matter? Do you want to use an old language? Try Fortran or LISP. > Would > someone experienced in C be able to dive right into C++ rather than > obj-c ? Not quite dive in, at least not into the OO parts of C++. ...

C++ or C?
I am new to MPI and have a basic understanding of C and C++. So I was wondering if any of you guys with experience in using MPI had any pointers with regards choosing either C or C++. I intend to use MPI in parallelizing code I have that was written in Java. So obviously the Java code it is heavly object orientated. With regards parallelizing it; right now I think it will mainly be a Master-Slave style of design with no inter-process communication needed once the master has sent the work to the slave. Most, if not all, of my communications will involve simply sending a large object from the master to the slaves, with the slaves returning this object (a modified version of) to the master. Right now I am thinking that it would be most convenient to just write it in C++. But with regards performance, will there be a significant overhead in using C++ as oppossed to C. Also, can I simply send a C++ object using MPI_Send? Apologies if these questions sound naive/trivial...but i am new :) Any help appreciated, Pat. Patrick schrieb: > I am new to MPI and have a basic understanding of C and C++. So I was > wondering if any of you guys with experience in using MPI had any > pointers with regards choosing either C or C++. > > I intend to use MPI in parallelizing code I have that was written in > Java. So obviously the Java code it is heavly object orientated. With > regards parallelizing it; right now I think it will mainly be a > Master-Slave style o...

About C and C++
Hello, I will resume it like this: On the criterias of "complexity" and "difficulty", the C and C++ programming languages are more complex and difficult than Object Pascal for example, so since they are more complex and difficult they are likely to create something like a darwinian filter who don't let the weaker humans among us humans to cross or to climb the social ladder, this is why i think that C and C++ do participate to social darwinism, this is why i say that C and C++ are bad. Thank you, Amine Moulay Ramdane. ...

More about C and C++
Hello, I have wrote: >I will resume it like this: >On the criterias of "complexity" and "difficulty", the C and C++ >programming languages are more complex and difficult than Object >Pascal for example, so since they are more complex and difficult they >are likely to create something like a darwinian filter who don't let >the weaker humans among us humans to cross or to climb the social >ladder, this is why i think that C and C++ do participate to social >darwinism, this is why i say that C and C++ are bad. Josep...

More about C and C++
Hello, I have wrote: >I will resume it like this: >On the criterias of "complexity" and "difficulty", the C and C++ >programming languages are more complex and difficult than Object >Pascal for example, so since they are more complex and difficult they >are likely to create something like a darwinian filter who don't let >the weaker humans among us humans to cross or to climb the social >ladder, this is why i think that C and C++ do participate to social >darwinism, this is why i say that C and C++ are bad. Joseph Mitzen repsonded: >Something may be more complex or more difficult to learn but it may >bring more capabilities. For instance, a helicopter is both >mechanically more complex and more difficult to learn to fly than an >airplane. However, helicopters possess vertical takeoff and landing >which allow it to reach places planes can not and also gives it >special abilities, such as hovering. >Two important measurements then are the value (what one gains for the >complexity) and what one needs to do (is language X enough for the >task, will feature Y be used, etc.). >Otherwise, one could simply say "Delphi is more complex and difficult >than Ruby or Python, therefore Delphi is bad." It's not only >simplistic, it's also meaningless (bad at what?). I understand your example of hellicopter, you are s...

What After C and C++?
First it was C, then C++, what comes next? "Penna Elabi" <terebinthus@go.com> wrote in message news:77081966.0311290846.3d5a7064@posting.google.com... > First it was A whole bunch of computer languages, then >C, then a whole bunch more computer languages, then >C++, what comes next? A whole bunch more. So what? Did you have a question about C++ (which is the *only* topic here) ? -Mike "Penna Elabi" <terebinthus@go.com> wrote... > First it was C, then C++, what comes next? Who cares? This newsgroup is concerned with C++, not with what c...

c++ or c#
hello all experiancesd techies, i am a final yr engg student with knowledge of c++ n java. i want to start windows programing, n hence have to decide whether to choose my language as c++ or c#. please guide me which language would benefit in the long run, if i intend to persue a job in a product development company/( like adobe) after graduation,(not in a consultancy like acenture). also suggest me good books for that. thanx a lot <pravin.chaudhary@gmail.com> wrote in message news:1131971088.291580.42500@g47g2000cwa.googlegroups.com... > i am a final yr engg student with ...

c++/c
hi i have been recently told that there is no exception handling ic c+ +.?? as far as i remember i have read, it has. also java has exception handling for sure but there we can use finally also which we cant use in c ++. what other differences do we have in the two languages c++ and java in exception handling. and which one is better? rupika wrote: > > i have been recently told that there is no exception handling ic > c++.?? You should ask about C in comp.lang.c, about C++ in comp.lang.c++. -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home...

C C++
While reading some source code, I saw a variable called "end" of type "time". So I investigated what the type "time" meant and saw that time was a typedef for "Real". So what does "Real" mean? "Real" is a typedef for QL_REAL. So what does "QL_REAL" mean? QL_REAL is type double via the line of code #define QL_REAL double.... "Mallik * G" <gadde.mallik@gmail.com> wrote in message news:7e4a882c-6f46-46eb-aa54-903842fa1b4d@p39g2000prm.googlegroups.com... > While reading some source code, I saw a variable cal...

C++ or C?
somebody told me that c++ is superior to c while others insist that c++ is just a junk. I don't know which to follow.I want to know exactly the difference between them, and their respective advantage and disadvantage. Magcialking wrote: > somebody told me that c++ is superior to c while others insist that > c++ is just a junk. > I don't know which to follow.I want to know exactly the difference > between them, and their respective advantage and disadvantage. www.google.com and read about the differences until you're blue in the face. Oh, while you're at it, loo...

More about C and C++
Hello... I have wrote: >I will resume it like this: >On the criterias of "complexity" and "difficulty", the C and C++ >programming languages are more complex and difficult than Object >Pascal for example, so since they are more complex and difficult they >are likely to create something like a darwinian filter who don't let >the weaker humans among us humans to cross or to climb the social >ladder, this is why i think that C and C++ do participate to social >darwinism, this is why i say that C and C++ are bad. Josep...

C++ to C
Are there any open source C++ compilers that will produce C code? I understand the first C++ compilers operated this way. On Mon, 27 Oct 2003 23:07:19 GMT, "Bootstrap Bill" <wrcousert@yahoo.com> wrote in comp.lang.c: > Are there any open source C++ compilers that will produce C code? I > understand the first C++ compilers operated this way. C++ compilers are off-topic in comp.lang.c. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq "Bootstrap Bill" <wrcousert@yahoo.com> writes: > Are there any open source C++ compilers that will produce C code? I > understand the first C++ compilers operated this way. You might want to have a look at Comeau - it's not open source, but it's cheap, and AFAIK does exactly what you want (www.comeaucomputing.com) HTH & kind regards frank -- Frank Schmitt 4SC AG phone: +49 89 700763-0 e-mail: frankNO DOT SPAMschmitt AT 4sc DOT com in comp.lang.c i read: >"Bootstrap Bill" <wrcousert@yahoo.com> writes: >> Are there any open source C++ compilers that will produce C code? I >> understand the first C++ compilers operated this way. > >You might want to have a look at Comeau - it's not open source, but >it's cheap, and AFAIK does exactly what you want but note ...

c++ or c#
Hi. I'm new to c++ and still learning it. I've been advised that c and c++ are now becoming obsolete..I better learn c# (supposedly the best language available) ..is it true?? * sandy: > Hi. I'm new to c++ and still learning it. I've been advised that c > and c++ are now becoming obsolete..I better learn c# (supposedly the > best language available) ..is it true?? The premise is false but many, including me, agree with the conclusion that you should learn e.g. C# first (obviously for different reasons). Learning C# or another language first might take you months o...

C or C++?
Hi, I am a newbie to programming, and sorry again that I have to ask the C or C++ questions. Is C required before learning C++? And become better in C does it also make you a better C++ programmer? Or that to be a C+ + programmer, it's better not to have any knowledge of C and start a new in the C++ way as some books suggest? weidongtom@gmail.com wrote: > Hi, > > I am a newbie to programming, and sorry again that I have to ask the C > or C++ questions. Is C required before learning C++? No. And become better > in C does it also make you a better C++ programmer? Not n...

c to c++
hi, i was wondering whether its worth converting from c to c++? i'm lazy but if its worth the effort... ______________________ http://monsterbeans.com/ | --------------------------------------- eminhanif@googlemail.com wrote: > hi, > i was wondering whether its worth converting from c to c++? > i'm lazy but if its worth the effort... Rather than participating in the language war flamefest your message invites, I will simply make the most obvious point: it is worth your while to learn any language that will be used in connection with your work. This includes learning a ...

C++11 Features in Visual C++ 11
(Apologies if this has already been posted here.) C++11 Features in Visual C++ 11: http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx I think a great big *sigh* is in order. Not much new for V11. cheers, Martin -- Stop Software Patents http://petition.stopsoftwarepatents.eu/841006602158/ http://www.ffii.org/ [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] On 27/09/2011 18:29, Martin B. wrote: > (Apologies if this has already been posted here.) > > C++11 Features in Visual C++ 11: > > http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx > > > I think a great big *sigh* is in order. Not much new for V11. > > cheers, > Martin > And considering that things such as delegating ctors have been stable for more than 5 years, I find the number of no entries disappointing. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] On Sep 27, 7:29 pm, "Martin B." <0xCDCDC...@gmx.at> wrote: > (Apologies if this has already been posted here.) > > C++11 Features in Visual C++ 11: > > http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx > > I think a great big *sigh* is in order. Not much new for V11. I tried replying to this blog article but it seems my post ...

C or C++
i would like someone with experience to answer my question ! C or C++ and why? Which one is stronger ? The criteria are yours! Thanks in advance guys. -- --------------------------------- --- -- - Posted with NewsLeecher v3.7 Final Web @ http://www.newsleecher.com/?usenet ------------------- ----- ---- -- - vadam17@hotmail.com ha scritto: > i would like someone with experience to answer my question ! C or > C++ and why? Which one is stronger ? The criteria are yours! > Thanks in advance guys. why cat or dog ? they are 2 different animals .... it is the same ... in my opinion...

About C and C++
Hello... I will resume it like this: On the criterias of "complexity" and "difficulty", the C and C++ programming languages are more complex and difficult than Object Pascal for example, so since they are more complex and difficult they are likely to create something like a darwinian filter who don't let the weaker humans among us humans to cross or to climb the social ladder, this is why i think that C and C++ do participate to social darwinism, this is why i say that C and C++ are bad. Thank you, Amine Moulay Ramdane. On Sunday, 8 June 2014...

c++ to c
Hello Everyone, I have a project where I need to write C++ code in C (due to OS issues). Can someone please show me exactly what I need to do to convert the code to C. Thanks Jami Here is the code I need to convert to C++: class CTestSuite : public CTestSuiteBase { public : CTestSuite(CTestBase *aTest); virtual ~CTestSuite(); virtual TInt InvokeTestL(int argc, char * argv[], TTestConfig * aConfig) ; IMPORT_C CTestSuite *GetTestSuite(); virtual int RunTestL(int aArgc, char *aArgv [], TTestConfig *aConfig); protected: CTestBase *iTest; } ; class CTestSuiteBase : p...

Web resources about - C++11 allows static member initialisation - comp.lang.c++

Enigma machine - Wikipedia, the free encyclopedia
Several different Enigma models were produced, but the German military models are the ones most commonly discussed. In December 1932, the Polish ...

bcm2835: Library initialisation and management
Sets the debug level of the library. A value of 1 prevents mapping to /dev/mem, and makes the library print out what it would do, rather than ...

Google didn't infringe on Oracle patents: jury
A jury has unanimously decided that Google did not infringe on two of Oracle's patents in the second phase of the court battle between the two ...

Cambridge Scientist Defends Claim That There Are Backdoors In US Military Chips
... to China and India. BI: How are they malicious? and are they all dangerous? SS: No, some features are made for debug purposes or memory initialisation. ...

Configuring a secure Ubuntu Linux Virtual Private Server
... uses the database and userid ‘ snort ‘ and I prefer to keep these different from a predictable default, in which case acidbase database initialisation ...

Using Yamaha MIDI synthesizers
If you have a synthesizer or keyboard sitting idly by and it has a General MIDI soundset, you might want to try using that instead of the MIDI ...

A Lazily Loaded Weakly Referenced Cache
Caching improves performance for data that is slow to obtain. Lazy initialisation can help performance and save resources for unused objects. ...

Single Chip Baseband Modem
Single Chip Baseband Modem: replaces user programmable DSPs and codecs

Issues - boblight - boblight - Google Project Hosting
My favorites ▼ - Sign in boblight boblight Project Home Wiki Issues Source New issue Search Search within: All issues Open issues New issues ...

utter! Voice Commands BETA! - Android Apps auf Google Play
Welcome to the BETA release of utter! Your offline voice controlled personal assistant with a difference... What makes utter! different? utter! ...

Resources last updated: 3/19/2016 6:53:36 PM