why I can't use thrust::sequence with device_vector?

i am new.

win7 x64 & vs2012 & cuda5.5 & thrust v1.70 & gtx 660

the code:

#include <thrust/iterator/constant_iterator.h>
#include <thrust/transform.h>
#include <thrust/functional.h>
#include <thrust/device_vector.h>

// for printing
#include <thrust/copy.h> 
#include <iterator>

int main(void)
{
    thrust::device_vector<int> data(4);
    data[0] = 3;
    data[1] = 7;
    data[2] = 2;
    data[3] = 5;

    // add 10 to all values in data
    thrust::transform(data.begin(), data.end(),
                      thrust::constant_iterator<int>(10),
                      data.begin(),
                      thrust::plus<int>());

    // data is now [13, 17, 12, 15]

    // print result
    thrust::copy(data.begin(), data.end(), std::ostream_iterator<int>(std::cout, "\n"));

    return 0;
}

it’s can Compilation,but when I run it,it will tell me :
First-chance exception at 0x7570C41F in CudaTest.exe: Microsoft C++ exception: thrust::system::system_error at memory location 0x0041F49C.

thanks !

sorry ,the code copy error! :D
this is right

using namespace std;
#include <thrust/sequence.h>
#include <thrust/device_vector.h>
#include <iostream>

int main(void)
{
	const int N = 1000;

	//init vector
	thrust::device_vector<int> d_Data(N);
    //fill vector
	thrust::sequence(d_Data.begin(),d_Data.end());
	//print
	for(int i =0;i<N;i++){
		cout << d_Data[i] << endl;
	}

    return 0;
}

Oh~ My.

I know, it’s can use with debug model!!