Click here to Skip to main content
15,891,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037227-Nov-14 1:19
Member 1123037227-Nov-14 1:19 
Thanks Richard. i've therefore coded the calculation of standard deviation (see below). However results differ from Excel from the 3rd decimal point.Do you have any idea, as i have done it meticulously?

I remembered someone working on sql server told me that depending on datatype used, computing 1/2 lead to a value close to 0.5 but still not 0.5. Do you think it might be an explanation, here?

Cheers

C#
int obs;
                     double mu, Ssigma, Svari, sum=0,sumsqr=0;

                     for (int i=1;i-1<dbdataset->Rows->Count-1;i++){
                         dbdataset->Rows[i-1]["DataRet"]=(System::Convert::ToDouble(dbdataset->Rows[i-1]["Population"])/System::Convert::ToDouble(dbdataset->Rows[i]["Population"])-1);
                         sum = sum + System::Convert::ToDouble(dbdataset->Rows[i-1]["DataRet"]);
                         obs = (dbdataset->Rows->Count-1);
                         mu = sum /obs;
                         sumsqr=sumsqr + pow((System::Convert::ToDouble(dbdataset->Rows[i-1]["DataRet"])-mu),2);
                         Svari=sumsqr/(obs-1);
                         Ssigma=sqrt(Svari);
                         lblvol->Text = Convert::ToString(Ssigma);

GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan27-Nov-14 1:33
mveRichard MacCutchan27-Nov-14 1:33 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037227-Nov-14 2:12
Member 1123037227-Nov-14 2:12 
QuestionFormat int in C Pin
Member 1056002225-Nov-14 4:47
Member 1056002225-Nov-14 4:47 
AnswerRe: Format int in C Pin
Albert Holguin25-Nov-14 5:01
professionalAlbert Holguin25-Nov-14 5:01 
QuestionRe: Format int in C Pin
David Crow25-Nov-14 16:34
David Crow25-Nov-14 16:34 
AnswerRe: Format int in C Pin
Kornfeld Eliyahu Peter25-Nov-14 22:49
professionalKornfeld Eliyahu Peter25-Nov-14 22:49 
GeneralPerform operations on c++ DataTable Pin
Member 1123037223-Nov-14 12:27
Member 1123037223-Nov-14 12:27 
GeneralRe: Perform operations on c++ DataTable Pin
PIEBALDconsult23-Nov-14 12:36
mvePIEBALDconsult23-Nov-14 12:36 
GeneralRe: Perform operations on c++ DataTable Pin
Member 1123037223-Nov-14 12:54
Member 1123037223-Nov-14 12:54 
GeneralRe: Perform operations on c++ DataTable Pin
bryce23-Nov-14 12:40
bryce23-Nov-14 12:40 
GeneralRe: Perform operations on c++ DataTable Pin
Member 1123037223-Nov-14 12:56
Member 1123037223-Nov-14 12:56 
GeneralRe: Perform operations on c++ DataTable Pin
Nelek23-Nov-14 13:20
protectorNelek23-Nov-14 13:20 
GeneralRe: Perform operations on c++ DataTable Pin
bryce23-Nov-14 13:41
bryce23-Nov-14 13:41 
GeneralRe: Perform operations on c++ DataTable Pin
Nelek23-Nov-14 22:52
protectorNelek23-Nov-14 22:52 
GeneralRe: Perform operations on c++ DataTable Pin
Member 1123037224-Nov-14 0:02
Member 1123037224-Nov-14 0:02 
GeneralRe: Perform operations on c++ DataTable Pin
Nelek24-Nov-14 0:52
protectorNelek24-Nov-14 0:52 
GeneralRe: Perform operations on c++ DataTable Pin
Nareesh123-Nov-14 13:33
Nareesh123-Nov-14 13:33 

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.