answersLogoWhite

0


Best Answer

Is an important thing to do.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Initialization of variables in namespace in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the order of initialization of data in C plus plus?

The general order of initialization is:Base class objects (if present)Member data objectsConstructor function code


What do you mean by initialization in c plus plus?

Not initialized variable: int myInt; Initialized variable: int myInt = 10;


What is naming space in c plus plus?

A namespace is a group of related identifiers.namespace ns {int i;double d;}Inside namespace ns, i and d can be used normally. Outside namespace ns, i is called ns::i and d is called ns::d. To import i into the current scope, say "using ns::i;". To import all identifiers in ns into the current scope, say "using namespace ns;". Namespaces can be nested:namespace ns1 {namespace ns2 {int i;}int i;}The i in namespace ns1 is fully qualified as ns1::i. The i in namespace ns2 is fully qualified as ns1::ns2::i. The two variables are distinct. Inside ns2, i refers to ns1::ns2::i; inside ns1, i refers to ns1::i.


How do you solve this error under-fined symbol 'cin'in c plus plus?

#include <iostream> using namespace std;


What is the difference between instantiation and initialization in C plus plus?

Instantiation is creating the instance of the variable/object . While Initialization is to provide the variable with some value. int i; // i is an instance of an integer i=10; //initialised with the value 10


What are some disadvantages of using namespace in C?

Here's one: there's no namespace in C


What is global object in c plus plus?

A global object is any object instantiated in the global namespace. The global namespace is anonymous, so if we don't explicitly specify a namespace prior to instantiating an object, that object will be instantiated in the global namespace: int x; // global namespace n { int x; // non-global }; To refer to the non-global, we must use namespace resolution: x = 42; // assign to the global n::x = 42; // assign to the non-global


In c plus plus Programming can you replace STDio header with using name space STD?

No. You can't use namespace std even if you include stdio.h. At the very least you must include stddef.h before you can use namespace std.


What is the use of using namespace STD in c plus plus programming?

No, the use of 'namespace std' is not compulsory. You can specifiy it on any object reference. Specifying 'namespace' simply provides a default value. Contrast ... using namespace std; cout << "Hello world!" << endl; ... with ... std::cout << "Hello world!" << std::endl;


Fundamental components of a c plus plus program?

#include <iostream> using standard namespace std; int main() { cout << "your prob shouldn't be taking c++"; return 0; }


What is the difference between initialization assignment of a variable in C programming explain withexample?

Initialization is when you assign a value to a variable at definition. For instance...int i = 123;Assignment is when you assign a value to a variable at a later time. For instance...int i;i = 123;Sometimes, automatic initialization (to zero) can occur without the explicit = clause, such as for file scoped variables, or for variables allocated through a debug allocator, but it is in bad form to depend on such values.I would fire a programmer that repeatedly fails to initialize variables, and I would flunk a student that does the same.


How do you avoid garbage values in c plus plus programs?

Initialization. Hint: your compiler might warn you, neverignore warnings if you aren't absolutely sure what they mean.