How many ways are there to initialize an int with a constant, C/C++ Programming

There are two ways for initializes in C++ as shown in the example that follows. The first way uses the traditional C notation. The second way uses constructor notation.

int foo = 123;

int bar (123);      

 

 

Posted Date: 4/9/2013 12:45:57 AM | Location : United States







Related Discussions:- How many ways are there to initialize an int with a constant, Assignment Help, Ask Question on How many ways are there to initialize an int with a constant, Get Answer, Expert's Help, How many ways are there to initialize an int with a constant Discussions

Write discussion on How many ways are there to initialize an int with a constant
Your posts are moderated
Related Questions
Project Overview A certain financial institution (bank) wishes to promote its new business products/services by conducting road shows in rural areas. Their aim is to encourage peop

Program to convert fraction to decimal: int main() {                 float num, denom;     // numerator and denominator of fraction                 float value;

How do I allocate multidimensional arrays by new? A: There are several ways to do this, based on how flexible you wish the array sizing to be. On one acute, if you know all the

Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks. For Example : GetHighestLowestMarks{Student{n}, Ma


The definition of an object(variable ): We can explain a variable(set memory to the variable) in the following ways. e.g. double salary; int month; When more than o


how to see inbox details of a particular email adress on console

The #define Directive The #define directive explains a macro which is a text string represented by a name. Whenever the pre-processor finds this name in the program, it is repl

Networking program development. 1.ARP protocol. 2.Switching HUB. 3.wireshark. 4.winpcap library. 5.C++ & MFC. 6.LAN evironment through switch and HUB(static ARP t