that_one_nigga_you_k

passar valores de vetor com ponteiros de uma função pra outra

Jun 25th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void numeros(int *coisas){
  6.  
  7.     for(int i = 0; i<20; i++){
  8.         coisas[i] = i;
  9.     }
  10.  
  11.     //return coisas;
  12. }
  13.  
  14. int main(){
  15.  
  16.     int num[20];
  17.  
  18.     numeros(num);
  19.    
  20.     cout<<num[13];
  21.  
  22.     return 0;
  23. }
Add Comment
Please, Sign In to add comment