blog

Personal blog
git clone git://git.laack.co/blog.git
Log | Files | Refs

ring.cpp (229B)


      1 #include <string>
      2 
      3 int main(int argc, char** argv) {
      4 
      5 	if(argc != 2) {
      6 		return -1;
      7 	}
      8 
      9 	int sz = std::stoi(argv[1]);
     10     int* ls = (int*)malloc(sizeof(int)*sz);
     11 
     12 	for(int i = 0; i < sz; ++i) {
     13         ls[i] = i;
     14 	}
     15 	return 0;
     16 }