If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Guest
Post
by Guest » Sun Jun 05, 2005 9:08 pm
heres my code,
//////////////////////////////////////////////////////////////////////
#include "iostream"
#include "holla.h"
//////////////////////////////////////////////////////////////////////
using namespace std;
int main();
{
cout;"halo2"
return 0;
}
it keeps saying missing function header what do i have to do?
MAJOR NOOB!
Armen138
Posts: 298 Joined: Mon Feb 23, 2004 3:38 am
Post
by Armen138 » Sun Jun 05, 2005 9:39 pm
if you're looking for me, start looking on irc, i'm probably there.
Guest
Post
by Guest » Sun Jun 05, 2005 9:48 pm
want it say halo2 i get this error/ C:\Program Files\Microsoft Visual Studio\MyProjects\holla world\holla.cpp(10) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
Guest
Post
by Guest » Sun Jun 05, 2005 9:50 pm
new code same error
// holla.cpp
//
//////////////////////////////////////////////////////////////////////
#include "iostream"
#include "holla.h"
//////////////////////////////////////////////////////////////////////
using namespace std;
int main();
{
cout<<"halo2";
return 0;
}
Armen138
Posts: 298 Joined: Mon Feb 23, 2004 3:38 am
Post
by Armen138 » Sun Jun 05, 2005 9:58 pm
Code: Select all
//////////////////////////////////////////////////////////////////////
#include "iostream"
#include "holla.h"
//////////////////////////////////////////////////////////////////////
using namespace std;
int main()
{
cout<<"halo2"
return 0;
}
if you're looking for me, start looking on irc, i'm probably there.
ondrew
Posts: 20 Joined: Fri Oct 03, 2003 2:24 pm
Location: Czech Republic
Post
by ondrew » Sun Jun 05, 2005 10:02 pm
what about the semicolon after main? there shouldn't be one
Code: Select all
int main() <- no semicolon
{
...
}
edit:
@Armen138 damn, you were faster
Guest
Post
by Guest » Wed Jun 08, 2005 4:37 am
#include<iostream>
Midnight
Posts: 1772 Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland
Post
by Midnight » Wed Jun 08, 2005 5:53 pm
armen had it guys
Myth
Posts: 81 Joined: Wed Apr 13, 2005 5:48 pm
Post
by Myth » Wed Jun 08, 2005 6:25 pm
"Guest" was right.
Code: Select all
//////////////////////////////////////////////////////////////////////
#include <iostream.h> // I changed it
#include "holla.h"
//////////////////////////////////////////////////////////////////////
// I removed the namespace
int main(void) // Added void, didn't know it was called a semicolon :?
{
cout<<"halo2"; // Here I've added ;
return 0;
}
- Myth
hybrid
Post
by hybrid » Wed Jun 08, 2005 10:45 pm
Shouldn't cout be in namespace std? Thus it should be std::cout or
somewhere before. And don't forget to flush your output stream, e.g. by appending <<std::endl; to really get the output at the place where you want to have it.