OpenCL c++ error

Hi. I am new to opencl domian. I have read through some books and try to compile following code

#define __NO_STD_VECTOR
#define PROGRAM_FILE “”
#define KERNEL_FUNC “blank”

#include <cstdio>
#include <fstream>
#include <iostream>
#include <iterator>

#ifdef Windows
#include <OpenCL/cl.hpp>
#include <CL/cl.hpp>

using namespace std;
using namespace cl;

int main()
//int n = 10;

vector&lt;Platform&gt; platforms;
vector&lt;Device&gt; devices;


catch (exception e)

return 0;


but it gives me many errors.

most of them are as following

Error 14 error C4996: ‘cl::vector<char *,10>’: was declared deprecated C:\Program Files (x86)\AMD APP SDK\2.9\include\CL\cl.hpp 1138 1 Matrix_multilpy_C

So can any one please help me. I am using visual studio 2013 to code and I have find out my version is openCL 1.2


to save folks time, I see this is already being discussed elsewhere:

Hi. yes I have added the same question to the stackoverflow but still no one provide the reasonable answer, that’s why I have posted it here.

thanks in advance.