Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: windows version of message queue? Pin
Richard MacCutchan29-Nov-14 23:23
mveRichard MacCutchan29-Nov-14 23:23 
AnswerRe: windows version of message queue? Pin
Albert Holguin1-Dec-14 4:20
professionalAlbert Holguin1-Dec-14 4:20 
Questionhow to use message queue in windows Pin
neodeaths29-Nov-14 6:47
neodeaths29-Nov-14 6:47 
AnswerRe: how to use message queue in windows Pin
Richard MacCutchan29-Nov-14 23:24
mveRichard MacCutchan29-Nov-14 23:24 
AnswerRe: how to use message queue in windows Pin
jschell30-Nov-14 6:18
jschell30-Nov-14 6:18 
AnswerRe: how to use message queue in windows Pin
Albert Holguin1-Dec-14 3:59
professionalAlbert Holguin1-Dec-14 3:59 
QuestionImageHlp.h and DbgHelp.h in the same program Pin
Richard Andrew x6428-Nov-14 8:33
professionalRichard Andrew x6428-Nov-14 8:33 
AnswerRe: ImageHlp.h and DbgHelp.h in the same program Pin
CPallini29-Nov-14 0:04
mveCPallini29-Nov-14 0:04 
QuestionDllMain safety Pin
Richard Andrew x6425-Nov-14 11:09
professionalRichard Andrew x6425-Nov-14 11:09 
AnswerRe: DllMain safety Pin
«_Superman_»25-Nov-14 18:51
professional«_Superman_»25-Nov-14 18:51 
GeneralRe: DllMain safety Pin
Richard Andrew x6428-Nov-14 8:30
professionalRichard Andrew x6428-Nov-14 8:30 
Questionc++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037225-Nov-14 9:46
Member 1123037225-Nov-14 9:46 
SuggestionRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
David Crow25-Nov-14 16:30
David Crow25-Nov-14 16:30 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 1:15
Member 1123037226-Nov-14 1:15 
AnswerRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan25-Nov-14 22:17
mveRichard MacCutchan25-Nov-14 22:17 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 1:13
Member 1123037226-Nov-14 1:13 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 2:46
mveRichard MacCutchan26-Nov-14 2:46 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 3:17
Member 1123037226-Nov-14 3:17 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 3:20
mveRichard MacCutchan26-Nov-14 3:20 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 3:44
Member 1123037226-Nov-14 3:44 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 4:11
mveRichard MacCutchan26-Nov-14 4:11 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 9:06
Member 1123037226-Nov-14 9:06 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 9:50
mveRichard MacCutchan26-Nov-14 9:50 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 23:23
Member 1123037226-Nov-14 23:23 
Hi Richard

Thanks. I've made a simple console app and can confirm that the String class does work and you could create string variables such as string codeproject without problem. However,based on facts it looks like a different story when dealing with c++/cli.

Back to the main standard deviation calculation, i think it could not work as a columns can't directly be assigned to a type and treated like a variable (see below). it could have worked in vba by selecting the column range and perform the built-in functions: c++ sqrt() or math::sqrt().

Hence the solution of last resort: iterate through each row and perform the calculation in several steps (get the mean from "DataRet" column first, then carry out ... ) unless a you have a better idea. Cheers

Error C2440: 'initializing' : cannot convert from 'System::Data::DataColumn ^' to 'double'



C#
DataTable^dbdataset=gcnew DataTable();
                     DataColumn^rt_col=gcnew DataColumn();
                     rt_col->ColumnName = "DataRet";
                     rt_col->DataType=System::Type::GetType("System.Double");
                     dbdataset->Columns->Add(rt_col);

                     sda->Fill(dbdataset);

                     double varet = dbdataset->Columns["DataRet"]; //already double type, no need System::Convert::ToDouble
                     double vola = sqrt(varet);
                     lblvol->Text = Convert::ToString(vola);

GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan27-Nov-14 0:02
mveRichard MacCutchan27-Nov-14 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.