Using .irr map files

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.
Post Reply
alex_dude_122
Posts: 4
Joined: Fri Nov 17, 2006 3:01 am

Using .irr map files

Post by alex_dude_122 »

Hello, I'm new to the Irrlicht engine and I'm just beginning C++. So, I was following a tutorial on the tutorial page on the Irrlicht web site, the Load .irr files tutorial (http://irrlicht.sourceforge.net/tut015.html) to try to load a test .irr file I made and by copying everything from the tutorial, then compiling, I get:

Code: Select all

Compiling Irrlicht with Visual Studio 6.0, support for DX9 is disabled.
c:\documents and settings\alex\desktop\irrlicht-1.1\test.cpp(18) : error C2039: 'cin' : is not a member of 'std'
c:\documents and settings\alex\desktop\irrlicht-1.1\test.cpp(18) : error C2065: 'cin' : undeclared identifier
c:\documents and settings\alex\desktop\irrlicht-1.1\test.cpp(18) : warning C4552: '>>' : operator has no effect; expected operator with side-effect
c:\documents and settings\alex\desktop\irrlicht-1.1\test.cpp(34) : error C2955: 'dimension2d' : use of class template requires template argument list
        c:\documents and settings\alex\desktop\irrlicht-1.1\irrlicht-1.1\include\dimension2d.h(50) : see declaration of 'dimension2d'
Error executing cl.exe.

test.exe - 3 error(s), 1 warning(s)
As a beginner in C++ I can't figure out why this is happening but it seems as if the two .h files that were supposed to be here:

Code: Select all

#include 
#include
As-12
Posts: 12
Joined: Tue Jul 25, 2006 1:19 pm
Location: Thailand , CMI

Post by As-12 »

Hi . I am just getting start on these stuff too but here is my ideas.
I think you forget to include <iostream> because it says that cin undeclare
and I think you forget to send agrument of function template.
Try
#include <iostream> //at front
using namespace std; if you want to.


Here how to send argument to dimension2d and you need to send a correct one. (See Irrlicht Documentation for more details>
dimension2d<arugment>
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The broken includes are a copy/paste error. Someone forgot that the less than and greater than signs (<,>) need to be replaced with the html escape sequences (<,>) when they made the tutorial.

You probably just need to change the lines to

Code: Select all

#include <iostream>
#include <irrlicht.h>
alex_dude_122
Posts: 4
Joined: Fri Nov 17, 2006 3:01 am

Post by alex_dude_122 »

It still doesn't work. :(

I would be nice like someone knowledgeable or the writer to fix the tutorial.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I would be nice like someone knowledgeable or the writer to fix the tutorial.
Good insult dude! You've got a total of 2 posts and you're already calling people stupid. Nice.

If you're that hung up on this problem maybe you should look at the actual source code for example 15. In case you are having a hard time finding that it is in examples/15.LoadIrrFile/main.cpp.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

vitek wrote:
I would be nice like someone knowledgeable or the writer to fix the tutorial.
Good insult dude! You've got a total of 2 posts and you're already calling people stupid. Nice.
ROFL


Right, all tutorials are included to the sdk and they're working, too !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
alex_dude_122
Posts: 4
Joined: Fri Nov 17, 2006 3:01 am

Post by alex_dude_122 »

vitek wrote:
I would be nice like someone knowledgeable or the writer to fix the tutorial.
Good insult dude! You've got a total of 2 posts and you're already calling people stupid. Nice.

If you're that hung up on this problem maybe you should look at the actual source code for example 15. In case you are having a hard time finding that it is in examples/15.LoadIrrFile/main.cpp.
You have obviously took my post wrongly. I wasn't insulting the author, I was saying that either anyone who is knowledgeable or the author, to fix it because it may confuse a Irrlicht beginner as myself.

I'll take a look in the examples folder.
alex_dude_122
Posts: 4
Joined: Fri Nov 17, 2006 3:01 am

Post by alex_dude_122 »

Great! It works. Thanks
Post Reply