An error in Code blocks C++ [duplicate] - c++

This question already has answers here:
How can I add C++11 support to Code::Blocks compiler?
(4 answers)
Closed 5 years ago.
Why does Code blocks show me the error
error: in C++98 'pro' must be initialized by constructor, not by '{...}'|
When I use std::string pro{'A','B','C','D','E','F'};?
How can I fix this?

You are using C++ 98 standards and it doesn't support { } initialization.
You have two options...
use -std=c++0x flag while compiling to use newer C++ standards.
Do initialization in the constructor or somewhere else.

Related

delegating constructors are permitted only in C++11 [duplicate]

This question already has answers here:
How to Setup VS Code For C++ 14 /C ++17
(5 answers)
How to enable C++17 support in VSCode C++ Extension
(8 answers)
Closed last month.
enter image description here
How do I declare a delegate constructor?
Please tell me how to declare a delegation constructor in a version other than C++11.

Confused by notation in boost::thread example [duplicate]

This question already has answers here:
What's the difference between parentheses and braces in c++ when constructing objects
(1 answer)
what is aggregate initialization
(2 answers)
Closed 9 months ago.
From boost libraries, I found this example
I marked a line with a red arrow, indicating the notation that is confusing me.
Is this special to boost or is this some sort of anonymous function syntax? I wasn't aware that C++ or C had such notation. I only kind of recognize it from python and java experience.

Visual studio c++ why don't 0b00000001 compile [duplicate]

This question already has answers here:
Can I use a binary literal in C or C++?
(24 answers)
Closed 8 years ago.
I am trying to port a small program I initially made for Linux, The only thing that gives me a error now is any binary numbers written like this 0b01010101.
I can't find any information on why this does not work on windows or how I could get it to work on windows.
Is this not standard in c++?
Currently, this will not work.
This will be a new feature of C++14. Numeric literals in C++14 can be specified in binary form. The syntax uses the prefixes 0b or 0B.

Module support in c++ [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicates:
Modules in C++0x
why a compiler can't find a template definition in .cpp
I'm wondering if it is planned to add a Module support in C++ instead of current header system ?
I have discovered this paper : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2316.pdf
Any news on that ?
Modules aren't in the new C++0X/C++11.
See: C++ Modules - why were they removed from C++0x? Will they be back later on?

question about auto in c++ [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Is there any reason to use the ‘auto’ keyword in C / C++?
can anybody explain me purpose of auto keyword in c++? thanks
It's useless and is left for old code compatibility. Long ago you used it to say that a variable is automatic, this is no longer useful - all variables witout other qualifiers are treated as automatic (stack-allocated).