"Viewing" a Function With Multiple Arguements

Hello. I am making a program and I have multiple functions. for example, it looks like this:

function1(int* var1,int* var2,int* var30
{
*var1 blah blah blah
*var2 blah blah blah
*var3 blah blah blah
}
function2()
{
int vara ;
int varb ;
int varc ;
function1(&vara, &varb, &varc)
blah blah blah
}
int main()
{
//how do I "view" function1?
}
Any help will be appreciated. Thank you!
You're going to need to clarify what you mean by "view".

<unhelpful> To literally view it... look at it in a text editor with your eyes. =P </unhelpful>


EDIT: do you mean calling the function? Step through with a debugger? etc?

If you can't explain any better than "view", then try to give us an example of what you want to happen.
Last edited on
I'm sorry for my bad discription. I meant by "view" :
Example:
fnc1()
{
int a ;
cin >> a ;
cout <<"\n"<< a ;
}
int main()
{
//now I want the fnc() function to display its content on the black input and output screen.
}
You mean... like printing the source code?

Like you would actually want it to print:
1
2
3
4
void func1()
{
  int a;
  ...

?


If that's what you mean... then you can't. The source code does not exist in the program. When you compile it, all that info is lost.

The only way would be to have your program open up the .cpp file, read from it, then print it out to the screen.
Topic archived. No new replies allowed.