indentation

How should this be properly idented?


#include <iostream.h>
#include<conio.h>
void myFunction(int,int*);
void myFunction_secondForm(int, int&);
void main()
{
clrscr();
int callValue=2;
int callReference=2009;
myFunction(callValue, &callReference);
cout<<"The modified value of the variable callReference is now :"<<callReference<<"\n";
myFunction_secondForm(callValue, callReference);
cout<<"The modified value of the variable callReference is now :"<<callReference<<"\n";
getch();
}

void myFunction(int callValue, int* callReference)

{

/*here num is passed by value and yrs is passed by reference*/

/* here we will increment yrs by num*/

*callReference=*callReference+callValue;

}

void myFunction_secondForm(int callValue, int& callReference)
{
callReference=callReference+callValue;
}



And also, conio is unreliable and poor style. See the articles for help on clearing the screen and preventing console closedowns.
Topic archived. No new replies allowed.