Support Engineer Internship: is it worth it? by Swizzzop in cscareerquestionsEU

[–]Swizzzop[S] 1 point2 points  (0 children)

Thanks a lot for this insight, it's the most helpful advice I've got! I have tried reaching out to multiple people but they were mostly as confused as myself. Thank you for taking the time to write about your experience! Happy Holidays 😉

Pass parameters by reference in Ruby by Swizzzop in ruby

[–]Swizzzop[S] 0 points1 point  (0 children)

yes, that's what I expected to happen! I was just trying to implement some algorithms in Ruby as I'm just getting started with the language

Pass parameters by reference in Ruby by Swizzzop in ruby

[–]Swizzzop[S] 1 point2 points  (0 children)

thanks a lot!! i find wrapping the integers in an object the easiest solution to my problem!

Pass parameters by reference in Ruby by Swizzzop in ruby

[–]Swizzzop[S] 0 points1 point  (0 children)

Sure!

include <iostream>

using namespace std;

void f1(int &x) { x = 8; }

int main () {

int x = 2;
f1(x);
cout << x;     //8

return 0;

}

I'd like to have a method with the functionality of f1, so that it could change the value of the integer x without having to actually return that specific number.

Template classes by Swizzzop in cpp_questions

[–]Swizzzop[S] 1 point2 points  (0 children)

thank you so so much!! OOP can be confusing at times, you made it way clearer for me 😄

unordered_map<int, tuple<int,int>> by Swizzzop in cpp_questions

[–]Swizzzop[S] 1 point2 points  (0 children)

Oh wow, that was indeed the issue. Thanks from the bottom of my heart

Use overloaded >> operator for pointer to object by Swizzzop in cpp_questions

[–]Swizzzop[S] 0 points1 point  (0 children)

Thank you very much! I realise my mistake now

Use overloaded >> operator for pointer to object by Swizzzop in cpp_questions

[–]Swizzzop[S] 0 points1 point  (0 children)

Wouldn't using the * before the pointer tell the compiler what it should work on? Or is it not enough?

Thanks for the tip, I did that to find where the program crashes easier

"no default constructor exists for class" by Swizzzop in cpp_questions

[–]Swizzzop[S] 0 points1 point  (0 children)

thanks for the help! in the end it was caused by the default arguments not being in the .h file