COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/testing/make_sheet.cpp
Go to the documentation of this file.
00001 #include <coopy/IntSheet.h>
00002 
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 
00006 using namespace coopy::store;
00007 
00008 int main(int argc, char *argv[]) {
00009   if (argc<3) return 1;
00010   IntSheet s;
00011   int h = atoi(argv[1]);
00012   int w = atoi(argv[2]);
00013   s.resize(w,h,0);
00014   int ct = 0;
00015   for (int y=0; y<h; y++) {
00016     for (int x=0; x<w; x++) {
00017       ct++;
00018       s.cell(x,y) = ct;
00019     }
00020   }
00021   SheetStyle style;
00022   printf("%s",s.encode(style).c_str());
00023   return 0;
00024 }
00025 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines