I have to import and work with a C++ Project. However, I can´t get it to run without Microsoft Visual Studio. The Author of the project told me, I have to use a Microsoft Compiler, because only this one can handle particular notations he used (e.g. creating Objects on the fly while passing it to a method). See example.
lights.push_back(Light(Vector(dirx,diry,dirz).normalize(), Color(colr, colg, colb)));
I had to create an vector object before and pass it to the method.
Can anyone tell me which compiler I can use?
I dont have enough bit flow to download 3 gb Visual Studio.
Great but not necessary would be a compiler that I can use on Mac OS.
cheers.
Any C++ compiler can ‘create objects on the fly while passing it to a function’ (these are often known as temporary objects or rvalues).
What Visual C++ can do that other C++ compilers generally can’t is pass those temporary objects to functions through parameters that are non-const references. The C++ standard specifically forbids that behavior, but MSVC allows it (Microsoft calls it an extension).
I’m guessing that that is the behavior the Author of the project is depending on.