• (2 Pages)
  • +
  • 1
  • 2

Make a text combat game in C++ plays like pokémon/final fantasy where you fight a monster

#16 AbeLinclolnstein  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-April 12

Posted 23 April 2012 - 06:52 AM

So you can use it to define it as one thing, then define it as another inside the "#ifndef" if it hasn't been called?
Was This Post Helpful? 0
  • +
  • -

#17 rurunosep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-November 12

Posted 20 November 2012 - 03:45 PM

Sorry for bumping such an old thread, but I've been having a problem with the code that I just can't see to solve. I keep getting an error referring to an "unresolved external symbol." I've looked it up and found that the error occurs when something is declared, but not defined anywhere in the code. However, no matter what I try, I can't find the source of the problem. I can copy and paste my code if necessary, but it should be exactly the same as the code in the first post besides the "Combat(Monster& C);" and the "#include <string>" changes. I would really appreciate it if someone could help me out.
Thank you.
Was This Post Helpful? 0
  • +
  • -

#18 Hezekiah  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 207
  • View blog
  • Posts: 550
  • Joined: 12-July 09

Posted 21 November 2012 - 01:01 AM

Please post the complete error message. It includes important information, like the name of the unresolved symbol.

Also, have you tried the code I uploaded in one of the previous posts? I can't remember exactly what I fixed, but I might have fixed your error as well.
Was This Post Helpful? 0
  • +
  • -

#19 rurunosep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-November 12

Posted 21 November 2012 - 02:58 PM

I use a Japanese copy of Visual Studio Express 2012, but I can roughly translate the error message. It says "Unresolved external symbol _WinMain@16 was referenced in the function __tmainCRTStartup." It also refers to a file MSVCRTD.lib(crtexew.obj) somewhere in the project folder. I never added this, so it must have been included by default.
I tried making a new, empty Win32 Project and importing the files the you uploaded and I ended up getting the same exact error. This makes me think that it's not an error in the code but probably in the way that I'm setting up or running the program. All I did in following the tutorial was create an empty Win32 project and type in all the code that was posted into the respective files.
I'm pretty new to C++, so maybe I'm missing some general step that was too obvious to mention in the tutorial? Because if your code works for you and not for me, then the problem probably isn't in the code itself.
Was This Post Helpful? 0
  • +
  • -

#20 Hezekiah  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 207
  • View blog
  • Posts: 550
  • Joined: 12-July 09

Posted 22 November 2012 - 06:27 AM

The project type is incorrect. It shouldn't be a Win32 project, it should be a console application.
Was This Post Helpful? 1
  • +
  • -

#21 rurunosep  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-November 12

Posted 25 November 2012 - 03:50 PM

I made a new console application project, imported all the files, and ran the program and it worked fine. Thanks a lot for the help.
Was This Post Helpful? 0
  • +
  • -

#22 ekta pasricha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-January 13

Posted 17 February 2013 - 05:54 AM

Hey This is Ekta Pasricha... A totally new n fresh aspirant to learn the coding of games... U see girls are least interested in the games as well as their so damn Fucking coding... But truly speaking I have that interest n m so damn interested... Plzz help me out...
Was This Post Helpful? 0
  • +
  • -

#23 s3lfik  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 18-April 13

Posted 22 April 2013 - 08:15 AM

Nice motivating tutorial :clap: maybe it's even cool having some misstakes in code to make others think of the solutions :sigh:

Terry Goodkind - "Think of the solution, not the problem"
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2