Search found 571 matches

by Yumtard
October 1st, 2019, 1:18 pm
Forum: Everything
Topic: Multidimensional Array
Replies: 7
Views: 210

Re: Multidimensional Array

Just rewrite the signature, I don't understand your problem. If you want vectors then something beautiful like this: void function( const std::vector<std::vector<int>>& a, const std::vector<int>& b ) or create a matrix class and just change the signature so it takes a matrix instead. If you need mor...
by Yumtard
September 30th, 2019, 11:21 am
Forum: Everything
Topic: Multidimensional Array
Replies: 7
Views: 210

Re: Multidimensional Array

I would've made a matrix class. Else you could use vectors.

If it's stricly 3x3 matrices you can also do this

void function(float a[3][3])
by Yumtard
September 28th, 2019, 5:58 pm
Forum: Everything
Topic: A quick question on reference initialisation
Replies: 5
Views: 182

Re: A quick question on reference initialisation

References must know what they're referencing when they are created. This is why they need to go in the initializer list. Stuff that get its value in the body of the constructor are actually first default constructed and then copy assigned. For this reason it's actually more efficient to initialize ...
by Yumtard
September 12th, 2019, 10:50 pm
Forum: Everything
Topic: Help with Collision code - :(
Replies: 5
Views: 260

Re: Help with Collision code - :(

I don't see a box to collide with. Anyways, x_botFixed and y_botFixed is set to 0 in the h file then const int left_fixed = x_boxFixed - 5; const int right_fixed = x_boxFixed + 5; const int top_fixed = y_boxFixed - 5; const int bottom_fixed = y_boxFixed + 5; So the reticle changes color when it goes...
by Yumtard
August 28th, 2019, 8:36 pm
Forum: Everything
Topic: Beginner Tutorial 17 Framertimer
Replies: 3
Views: 249

Re: Beginner Tutorial 17 Framertimer

What's happening is that you're creating another variable called last which is local to the mark function At the beginning of the function you also create a variable old and set its value to the member variable last. The value of the member variable never changes though since, as we established you'...
by Yumtard
May 19th, 2019, 4:55 pm
Forum: Everything
Topic: Homework 5 - Beginner C++
Replies: 7
Views: 579

Re: Homework 5 - Beginner C++

at the end of episode 5, chili gives you homework.
In the homework video he then shows his solution to the homework so obviously the code will be a bit different
by Yumtard
May 8th, 2019, 3:52 pm
Forum: Everything
Topic: Intermediate HW 16 - Problem 2 error with istream_iterator
Replies: 2
Views: 290

Re: Intermediate HW 16 - Problem 2 error with istream_iterator

try this std::istringstream ss( nambies ); std::transform( std::istream_iterator<std::string>( ss ), std::istream_iterator<std::string>(), std::ostream_iterator<int>( std::cout ), [&numbers]( const std::string& word ) according to the documentation, istream_iterator takes a ref to stream, not a cons...
by Yumtard
May 5th, 2019, 8:32 am
Forum: Everything
Topic: Learning and messing around
Replies: 18
Views: 1500

Re: Learning and messing around

Awesome! I'll follow this.

Good luck and have fun
by Yumtard
April 9th, 2019, 7:16 pm
Forum: Everything
Topic: [Updated 2019-06-25] Revamped C++ Networking Series using Sockets
Replies: 10
Views: 1199

Re: Revamped C++ Networking Series using Sockets

Awesome, I'm doing some socket programming for a project. Will check it out
by Yumtard
April 7th, 2019, 12:20 pm
Forum: Everything
Topic: Noob learns to code in 3 months
Replies: 670
Views: 45687

Re: Noob learns to code in 3 months

:O Congrats :D Great job. Thanks guys :) Thats all great n shit but I am still waiting for a working Spaceballs patch... Haha I believe it worked from the kk branch? If not I'll have to take a look at it. Epic journey. Thanks Chili :) And the journey continues! Still have lots to learn. this thing ...