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 print all the factors of a positive integer A

Constructors By definition, a constructor function of some class is a member function that automatically gets implemented whenever an instance of the class to which the constru


A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,

Queue - C++ program: Write a program to show the basic operations on queue. namespace stack {  const int max_size = 200;  char v(max_size);  int top=0;  void pu

Reverse a string - C ++ program: Write a program in c to reverse a string. int main() {     Stack theStack;     String reverse("reverse");       cout

Control Flow The control flow statements are used when it is needed that the flow of the program is to be changed after taking some decision. This control flow statement theref

padovan string for natural numbers program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Padov

Project Description: collect / modify person records / photo images/ lookup / facebook iphone and ipad App basic function : 1 user will configure facebook connection