2008/05/05 18:36:31.444 GMT-4

Stroustruppen (1)

Ovvero le disavventure di un programmatore Python alle prese con il C++.

Versione Python

offset = 10
length = 100

for i in range(-offset, length - offset): print "lavoro sull' indice", i

Versione C++

#include <iostream>

int main(int argc, char** argv)
{
unsigned offset = 10;
unsigned length = 100;

for (int i=-offset; i < length - offset; i++)
  std::cout << "lavoro sull' indice " << i << std::endl;
}

domanda

perche' la versione C++ non stampa nessun messaggio?

suggerimento

ma che cast vuoi?

Posted by: swarzy.2008/05/05 18:36:31.444 GMT-4
Tags: python programmazione cpp cazzeggio | Permalink

Post a comment





The CAPTCHA image

Please enter the letters shown in the image in the following text box. Provided by Captchas.net