i have two file.
file1.cpp
Code:
#include<stdio.h>
void func(int A[]);
int main()
{
int A[20];
A[0]=123;
A[1]=456;
func(A);
printf(" %d",A[2]);
return 0;
}
file2.cpp
//here is the body of the function
Code:
void func(int A[])
{ A[2] = A[0] + A[1];
printf(" hello "); //here i am getting error !!!!!!
}
then i did " add files to the project " and " rebuild all " to compile and run in VC++ ...... but i am getting " file2.cpp printf' : undeclared identifier " error.
but i need to print some variable etc inside that function . how can i print something(e.g value of variable etc) inside that function ???
thanks...
blue_gene