C++ 104 Classes Part 1
Loading...
16,617
Loading...
Uploader Comments (ryutenchi)
see all
All Comments (35)
-
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.
-
my ears too with headphones lol
-
massive attack \m/
-
What flavour of Linux is that dude?
-
dude check your audio please before uploading ... you almost shredded my speakers!
Loading...
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 1 year ago
@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^^
ryutenchi 1 year ago
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^_^
ryutenchi 3 years ago
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
onlynumbersas 3 years ago
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.
ryutenchi 3 years ago
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?
GPadd 4 years ago
you are correct, I do that sometimes. I'll make a note in the notes. Thank you for pointing that out^^
ryutenchi 4 years ago