gamehunter101
November 12th, 2006, 00:19
well i was following this tut and did it the exact same way but its not compiling
#include <iostream>
using namespace std;
void printString(void);
void simpleFunc (void);
void main()
{
cout <<"Before Function Call"<<endl;
printString();
cout <<"After Function Call"<<endl;
}
void simpleFunc (void);
{
cout <<"We are inside simple func"<<endl;
}
void printString(void)
{
cout <<"In Function Call"<<endl;
cout<<"Hello World"<<endl;
simpleFunc();
}
error
c:\documents and settings\pc\desktop\p2vid\functions2\functions2\fu n2.cpp(14) : errorC2447: '{' : missing function header (old-style formal list?)
thanks for the help
#include <iostream>
using namespace std;
void printString(void);
void simpleFunc (void);
void main()
{
cout <<"Before Function Call"<<endl;
printString();
cout <<"After Function Call"<<endl;
}
void simpleFunc (void);
{
cout <<"We are inside simple func"<<endl;
}
void printString(void)
{
cout <<"In Function Call"<<endl;
cout<<"Hello World"<<endl;
simpleFunc();
}
error
c:\documents and settings\pc\desktop\p2vid\functions2\functions2\fu n2.cpp(14) : errorC2447: '{' : missing function header (old-style formal list?)
thanks for the help