Added: 4 years ago
From: ryutenchi
Views: 16,616
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (35)

Sign In or Sign Up now to post a comment!
  • stfu n erd faggot get a new mic

  • you are person

  • I miss that compiler!

    Visual is so bland.

  • Jesus christ man take the fucking mic out of your throat.

  • int main(int argc, char* argv[])

    Why do you have to specify those parameters for the main function?

    What does that mean? I usually just do:

    int main()

    PS: Great music! I really like Massive Attack

  • @11889music They are the way to access the arguments passed into your program from the command line. argc is the number of arguments passed and argv is the array of arguments separated by spaces. argv[0] is always the name of your prog (in this case argv[0] would be "game") and then the first actual arg would be argv[1], so I could have made it so that I could have passed the char name by command line. if(argc>1) me.setName(argv[1]); or something like that^^

  • massive attack \m/

  • What flavour of Linux is that dude?

  • dude check your audio please before uploading ... you almost shredded my speakers!

  • my ears too with headphones lol

  • Thank you, this is just what I've needed to get my motivation back for school. I've been in a sort of educational rut lately, but now with this video, I can 'see' that games are possible. And I have a better understanding of how to develop them. I was originally just here to get some more auditorial information on classes, but I found my motivation too.

    You also did a great job with explaining everything. Now, back to homework....

  • your gay

  • Neat video, I'm not really using classes yet, but your tutorial shed some light on what classes actually are.

  • thanks so much man, you made classes so much easier to learn. Great Tutorial 5/5!

  • No actually the #endif needs to be at the end of the definition/declaration or else you make have instances where you'll get errors about the double-def. because A.cpp includes both char.h and b.h but b.h also included char.h so when the complier brought all the code together if that #endif wasn't at the end of the file it would put the code for char.h in twice... which is the double-def error^_^

  • If this was designed for non-programmers then I doubt it will be understandable. Good video though; I learnt a lot. But shouldn't the '#endif' be right after the '#ifndef __CHAR_H__' and '#define __CHAR_H__'?

  • thank you for posting this, but do you know how to get the source code from a program, i am trying to see how people made a genetic algorithm for the traveling salesman problem, and i want to see the source code, can you help me? give me any tips or anything i would turly appreciate it

  • There are what are called disassemblers out there that you can use to disassemble compiled code into what is called assembly code and then you can translate that into c-pseudo code to make it easier to read. this is what we did for the broadcom driver, but it's been a while so you will have to google it, sorry. hope that was enough keywords to help you get started.

  • this was real good, i cant xplain how much it helped..anyhow,u hav ntn on polymorphism? that seems pretty hard still

  • You repeat what protected is two times, but as I understand it, the first explanation is about private. And the second is about protected.

    Or am I wrong?

  • I may have meant private and said protected. I'll watch it again later and check^^

  • you are correct, I do that sometimes. I'll make a note in the notes. Thank you for pointing that out^^

  • I'm glad that I could help.

    I like what you do, so.

    That's the least I can do :-)

  • is it possible to pass a class to different functions?. Relating it to your video. If you have a function "createChar()" where you have character me to set the variables for me.getName()  and all that kind of thing. but then when you go back to int main() its out of scope. Any help would be awesome.

  • sorry didnt realize i posted twice the first one didnt post for a while

  • Scope can be tricky. There are 3 ways to get around this. Pass an object of a class by reference to the function through its params, make a global object(above main()), and finally make the class what's called a singleton, this makes it so that there is only one instance possible of the class. I suggest passing a reference int createChar(character &instance){blah; return 0;} any changes to the passed object will still be there after returning

  • Thanks alot for the help

  • I was wondering how to pass a Class to a different function. Right now i have a few different Functions going on and the class appears to only have a scope in the function that i called it in. Hopefully that made some sense. Using this video as an example if you have a function called "int rolling()" to roll a character and then it goes and sets up the class for "me.function()" but then when we jump back to main and try to do "me.getName()" its not in scope anymore. Thanks!

  • man i watched all your tutorials and i almost wet my pants. I think i love you... can't wait for more tutorials especially on the ones for game creation.

  • You could write your code better by making it more readable. (concatenating, spacing, etc (style))

  • In order to be readable here on youtube I kinda have to "play jazz" with concatenating, spacing, etc(style). Besides, seems like everyone likes there code a different way, so why should I worry about that instead of worrying about people reading and learning?^_^

  • good

  • Thanks a lot for this dude, was really helpful - please make lots more vids!

    p.s. why do u use linux to program? wouldn't something like visual studio be a lot less hassle?

  • Always happy to help!

    Don't like Windows and while I could use VS in Linux, I don't like VS either. It's blotted and there are many IDEs out there that are better(emacs and geany are what I use, I'm getting better with emacs and liking it more all the time)

    That being said, whatever floats your boat, more power to you. I use what I like and what I've found that works best for me. If you(and this goes for anyone)ever want to make the leap let me know. I'll do all I can to help.

  • And i'll just mention there are many IDEs that are crossplatform or even open source so you can use f.e. Code::Blocks or DevC++ on GNU/linux, mac or windows. And you also can use gcc or g++ on windows (this is what Code::Blocks does) and write your programs in notepad or any other text editor. The point is to know what you're doing so, VS might be good for start but soon you're going to relize it's really heavy and you don't need most of it's functions or those work better in other IDEs. Cheers.

  • Good video as always, hope to see more on classes!

  • So you could say "\n" is the equivalent to doing a page break in HTML.

  • yes, it's the "newline" character

  • Thanks for the tutorials...

    If and when you do an openGL game could you use FLTK 1.1.7 to make the GUI? not FLTK since it is not really all that stable.

  • never played with FLTK but I'll take a look at it and we'll see^_^

  • thanks,

    I meant to say fltk 2.x is not too stable... fltk 1.1.7 is suposedly like a rock... and there is Equinox destop environment that uses eFLTK currently but they are backporting EDE to fltk 1.1.7 + libede to reduce dependancies so fltk is growing :-) also look up the fluid (an fltk gui creator that genrates c++ code) tutorials that are out there!

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