0

Hi everyone,
please anyone help me...
My program is correctly compiled but not runnig?
What would be the problem in my program??

6
Contributors
6
Replies
27
Views
3 Years
Discussion Span
Last Post by Ancient Dragon
0

Without source code it is very difficult to know.

Please post a short sample of your program, a description of what you expect to be happening and what is happening and we will be better equipped to help you out.

0

I can't speak for everyone, but we're not psychic. At the very least I don't know anyone with an Espeon as their avatar.

0

also
what is your environment?
what is your platform ?
what is your OS?
if your code is correct , must be check your software or other components

0
#include<iostream>
#include <cstdlib>
using namespace std;

// declaring global variable
int i;

int main()

{
     i=10;
     cout<<"In main() the value of i is:" <<i; 
     f();   
     cout<<"Back in main the value of i is"<<i;     

     }


     void f()
    {
           cout<<"In f() the value of i is:"<<i;
     i=20; 
       system("pause");    
     }
0

Your program might compile but does the compiler produce any errors or warnings? You have to fix them befre you can run the program. I spot at least one error -- line 13, functions have to be declared before they can be called.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.