Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sonido metal
//clang 3.7.0 #include <iostream> #include <utility> #include <tuple> #include <type_traits> #include <sstream> struct V3 {double x,y,z; std::string toString() const{ std::ostringstream s; s << x<<" "<<y<<" "<<z; return s.str(); } }; V3 scale(V3 const &a, double const factor) { V3 v; v.x = a.x*factor; v.y = a.y*factor; v.z = a.z*factor; return v; } int main() { V3 v{1,2,3}; const V3 &v2 = scale(v,2); V3 v3 = scale(v,3); std::cout << v2.toString() << std::endl; std::cout << v3.toString() << std::endl; }
run
|
edit
|
history
|
help
0
BucketSort
virtual members
ArrayList Example Starter Code 2
non-deduced context
mine
hw1 Os
11/29
template specialization inheritance solution
Balanced Insert Heap Example
Task on Задача C. Белочка