return parameters..i dont know if the translation is ok, because the book am using is in italian..we say( parametri di uscità ..like exit parameters, i hope is the return parameters we talking about here...)
ok so lets say is the return parameter we talking about...when i have to return a single parameter..thats easy..(.return parameter ;) and we're done...but what if I have to return as parameter the coordinates of lets say a cell of a matrix?..those are two figures..how is that done? lets say i have to return too parameters on exiting( can that be said in english?) ok i want to return two parameters..how is that done? I hope i explained myself enough...
thank you :)
and one last questiong...if in my code i have like int num = 4000; declared...some where in the code i can still do..num = 5...and the initial value of num declared as integer 4000 will be replaced by 5? that is a correct syntax right? thank you
#include <iostream>
struct Point
{
int x;
int y;
}
Point make_point()
{
Point p = { 10, 20 };
return p;
}
int main()
{
int u;
int v;
Point p = make_point();
u = p.x;
v = p.y;
std::cout << "u = " << u << ", v = " << v << std::endl;
}