Define global variable in c++ program, C/C++ Programming

Define global variable in c++ program:

How to define a global variable and need of global variable in c++ program.

int main()

{

   int m=20;

   clrscr();

   for( int i=0;i<4;i++)

   {

     m=60;

     cout << m;

     cout<<"the global variable is\n"<

   }

     getch();

return m;

}

Posted Date: 10/19/2012 2:58:16 AM | Location : United States







Related Discussions:- Define global variable in c++ program, Assignment Help, Ask Question on Define global variable in c++ program, Get Answer, Expert's Help, Define global variable in c++ program Discussions

Write discussion on Define global variable in c++ program
Your posts are moderated
Related Questions
write a program to find the area under the curve y=f(x) between x=a & x=b


i need a program that find the number of negative integers in a list.

why oops

Area under the curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve bet

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

Write a program in C language to implement Two-Way Merge Sort. Input the following data to the program. Show all intermediate steps: 84, 83, 78,90,23,123,98,159,8,200


#Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

Explain the Command Line Parameters? The Command line arguments are parameters supplied to a program from the operating system. These arguments are parameters accepted to main