Horje
return multiple objects from a function C++ using references Code Example
return multiple objects from a function C++ using references
#include <iostream>
using namespace std;
void div(int a, int b, int &quotient, int &remainder) {
   quotient = a / b;
   remainder = a % b;
}
main() {
   int a = 76, b = 10;
   int q, r;
   div(a, b, q, r);
   cout << "Quotient is: "<< q <<"\nRemainder is: "<< r <<"\n";
}




Cpp

Related
pca compact trick Code Example pca compact trick Code Example
fibonacci Code Example fibonacci Code Example
shrek c++ Code Example shrek c++ Code Example
what do I return in int main() function c++ Code Example what do I return in int main() function c++ Code Example
c++ constructor Code Example c++ constructor Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12