D
Deepak
Hi friends i tried to compile following programs and link it, i got an error like
// hellofunc.h
/*
example include file
*/
extern void myPrintHelloMake(void);
// hellomake.cpp
#include "hellofunc.h"
int main()
{
// call a function in another file
myPrintHelloMake();
return 0;
}
// hellofunc.cpp
#include "hellofunc.h"
#include <iostream.h>
void myPrintHelloMake(void)
{
cout<<"Hello make files \n";
return;
}
i compiled the file with following commands on MKS KORN SHELL
cc hellofunc.cpp
cc hellomake.cpp
cc -hello hellofunc.obj hellomake.obj
i got this following error
"syntax error: got (, expecting Newline"
i cant understand why i get this error please help me in solving this problem.
your help is really appreciated..
regards,
Deepak
// hellofunc.h
/*
example include file
*/
extern void myPrintHelloMake(void);
// hellomake.cpp
#include "hellofunc.h"
int main()
{
// call a function in another file
myPrintHelloMake();
return 0;
}
// hellofunc.cpp
#include "hellofunc.h"
#include <iostream.h>
void myPrintHelloMake(void)
{
cout<<"Hello make files \n";
return;
}
i compiled the file with following commands on MKS KORN SHELL
cc hellofunc.cpp
cc hellomake.cpp
cc -hello hellofunc.obj hellomake.obj
i got this following error
"syntax error: got (, expecting Newline"
i cant understand why i get this error please help me in solving this problem.
your help is really appreciated..
regards,
Deepak