Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using std::endl;
  4. using std::cout;
  5. using std::string;
  6.  
  7. int main()
  8.  
  9. {
  10. int a = 5;
  11. char b = 'a';
  12. string c = "abc";
  13.  
  14. void *arr[3]={&a, &b, &c};
  15.  
  16. for(int i=0;i<3;i++){
  17.  
  18. cout << *arr[i]<< endl;
  19. }
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement