Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

rank() in c++

// array rank example
#include <iostream>
#include <type_traits>

int main() {
  std::cout << "rank:" << std::endl;
  std::cout << "int: " << std::rank<int>::value << std::endl;
  std::cout << "int[]: " << std::rank<int[]>::value << std::endl;
  std::cout << "int[][10]: " << std::rank<int[][10]>::value << std::endl;
  std::cout << "int[10][10]: " << std::rank<int[10][10]>::value << std::endl;
  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+3 =