SOL9 Sample: ArrayT

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * ArrayT.cpp 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */



#include <sol/ArrayT.h>

int main(int argc, char* argv[])
{
  try {
    __int64 MAX = 0x7FFFFFFFFFFFFFFF;

    __int64 data[10];
    for(size_t i = 0; i<SizeOf(data); i++) {
      data[i] =  MAX - (10000*i + 1000*i + 100*i + i);
    }

    ArrayT<__int64> array(data, SizeOf(data));

    int i = 0;
    for (i = 0; i<10; i++) {
      printf("array[%2d] = %I64u\n", i,array[i]);
    }
    printf("\n");

    for (i = 0; i<10; i++) {
      array[10+i] = -array[i];
    }

    for (i = 0; i<20; i++) {
      printf("array[%2d] = %I64u\n", i, array[i]);
    }

    printf("\n");
  } catch (Exception& ex) {
    ex.display();
  }

  return 0;
}


Last modified: 17 Aug 2016

Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.