Added: 3 years ago
From: antiRTFM
Views: 16,589
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (37)

Sign In or Sign Up now to post a comment!
  • Many, many thanks for this video tutorial. You are a great teacher!

    I get this message when compiling the code of this video: (it is referring to the tutorial.obj of the tutorial.cpp)

    error LNK2019: unresolved external symbol "public: int __thiscall Soldier::GetHealth(void)" (?GetHealth@Soldier@@QAEHXZ) referenced in function _main

    Another error messages in the same output (referring to the tutorial.exe) is: fatal error LNK1120: 1 unresolved externals

    What's wrong?

  • @ExavierLestat did you define Soldier::GetHealth() ? If you didn't, that would explain your error.

  • I like your voice; it's very... soothing. :)

  • what if you needed lots of different soldiers but you didn't want to clutter up the main? where is the best place to put them?

  • I'm using dev c++ compiler

    I separted the definition and declaration. Just followed wat u did but main cpp file gives error pointing at #include"filename.h" could u please help me out

    Thanks

  • Comment removed

  • Thank you for this video, this cleared up my problem of understanding why you would need a header (I've came from a C# background).

    Anyways I'm going to subscribe and watch all the vids in this series.

  • Is there somewhere i can get these tutorial source files after watching the video because i can;t see all the text in the header file?

  • Comment removed

  • So header files act as a kind of "bridge" between source files. Cool. Thanks

  • @Nezmundo00

    yup, good analogy :)

  • VS gets very cranky if you dont include your headers and namespace in your header files.

  • Man! You are God sent. This is by far the best tutorial on the subject. You are awesome at explaining stuff.

    I wish you all the best, and thanks a million!

  • I can't believe Im up to 40. approximately 400 minutes of learning c++

    thanks antiRTFM

  • Basically 6 hours and 50 minutes. ^_^

  • rofl i fail

  • lolz.

  • God Bless You

  • @MatrixNEO006 I like to see that any comment about God gets thumbs down, just joking. But seriously, its an interesting fact :)

  • good work antiRTFM i've learnt so much =D. Ty for your time

  • OMG! i've been doing my project for 2 days and its not working properly just because i didnt include the header file in main!! thanks a lot this really help me in finishing it =)

  • @jeezcak3 no your not.

  • i made a header file called "all.h" and i included everything i need in this file and then include it to every .cpp file hope that helps :)

  • stop spamming, i'm sick of you. :(

  • lol the views are 2009

  • when i try to run this prog i get linker errors. how do i correct that? i'm using tcc.

  • remind me whats tcc?

    did you maybe mean gcc?

  • turbo c++ compiler.

  • you'd need to lookup the documentation on how to correctly setup your environment so that the linker works.

    if your on windows i'd strongly recommend you use Microsoft Visual C++, everything is already setup in there

  • phew.. this cleared up quite a bit. I compiled last videos code and had a lot of errors even tough i tried it in two compilers.

  • If you just start a blank project, not any templates you won't have to add the stdafx.h!

  • if 'at once' you mean like in the same project or same source code file, yes

  • you probably switch off "precompiled headers" which i also demonstrate in one of the videos

  • if u compile all wat u've jus done will it work? because when i compiled it all i got a compiler error : 8 C:\Dev-Cpp\soldier.cpp expected init-declarator before "strength"

    and it high- lighted this part: strength(startstrength),

    the one in soldier.cpp

    whats it about?

  • not sure exactly why you get that error... try to pay more attention to the stuff im teaching and less attention to the actual code being shown. review about how exactly to make the initialization list and do it correctly on your own (not copying from my code)

  • great one !

  • Very great tutorial and I can't thank you enough.

    Even though I know most of the previous videos(yeah I watched all of the 40 vides! ;) )

    This one has taught a lot.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more