Question: I am sorry if this is a noob question but I am new to C++ and part of the reason I am messing with openCL is to learn more C++. 

I installed the CUDA SDK and it put openCL header files here:

```
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include\CL

```

I added the the following two directories to additional include directories in Visual C++:

```
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include\CL

```

But when I try to reference anything in the cl namespace, [like they do in this tutorial](http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/introductory-tutorial-to-opencl/) it does not work because cl is undefined.

![enter image description here](https://i.stack.imgur.com/a9ZM8.png)

Answer: 
You can also do this easily with LINQ and it's easier to read and more concise:

```
var users = from c in dt.AsEnumerable()
            group c by c.Field<string>("UserName") into gr
            select new  User { Username=  gr.Key ,
                                ControlNumbers = (from x in dt.AsEnumerable()
                                                  where x.Field<string>("UserName") == gr.Key 
                                                  select x.Field<int>("ControlNumber")).ToList() };

```

Update:
=======

```
List<User> userList = (from c in dt.AsEnumerable()
                group c by c.Field<string>("UserName") into gr
                select 
                new User { 
                           Username=  gr.Key ,
                           ControlNumbers = 
                           (from x in dt.AsEnumerable()
                           where x.Field<string>("UserName") == gr.Key 
                           select x.Field<int>("ControlNumber")).ToList() 
                          }
                        ).ToList();

```

So basically, you are taking your data table, grouping by UserName and using this list of unique user names to query the data table once again, to read all Control Numbers pertaining to the current UserName.
You could use a `Dictionary` like this:

```
public static void FillUserListClass()
{
    Dictionary<string, User> UserList = new Dictionary<string, User>();
    OleDbConnection conn = new OleDbConnection(strAccessConn);
    string query = "SELECT ControlNumber, UserName FROM Log WHERE Log.EndStatus in ('Needs Review', 'Check Search', 'Vision Delivery', 'CA Review', '1TSI To Be Delivered');";

    OleDbDataAdapter adapter = new OleDbDataAdapter(query, conn);
    DataTable dt = new DataTable();

    try
    {
        adapter.Fill(dt);

        for (int ctr = 1; ctr <= dt.Rows.Count; ctr++)
        {
            var row = dt.Rows[ctr];
            var userName = row["UserName"].ToString();
            if (!UserList.ContainsKey(userName))
            {
                UserList.Add(userName, new User()
                {
                    UserName = userName,
                    ControlNumber = new List<int>()
                });
            }
            UserList[userName].ControlNumber.Add((int)row["ControlNumber"]);
        }
    }
    catch (OleDbException ex)
    {

    }
    finally
    {
        conn.Close();
    }
}

```