I am trying to use numeric_limits< double>::min() in an MFC application
in Microsoft Visual C++.NET 2003. I am having some difficulties here.
The following are the parts of a simple program I wrote and
corresponding error massages. I am confused here. Similar codes work
fine in Win32 Console Project. Can you please help me to resolve
this? Thank you for your helps.
Best Regards,
Jalal
Code
-------------------------------
// Created by Microsoft Visual C++.NET
#include "stdafx.h"
#include "test.h"
#include "testDlg.h"
#include ".\testdlg. h"
// I have added to use numeric_limits
#include <limits>
using namespace std;
void CtestDlg::OnBnC lickedSubmit()
{
double y;
// TODO: Add your control notification handler code here
UpdateData(TRUE );
y = numeric_limits< double>::min();
// Writing y in dialog box
x.Format("%.10f ", double(y));
UpdateData(FALS E);
}
Error massage:
-----------------------
warning C4003: not enough actual parameters for macro 'min'
error C2589: '(' : illegal token on right side of '::'
error C2059: syntax error : '::'
in Microsoft Visual C++.NET 2003. I am having some difficulties here.
The following are the parts of a simple program I wrote and
corresponding error massages. I am confused here. Similar codes work
fine in Win32 Console Project. Can you please help me to resolve
this? Thank you for your helps.
Best Regards,
Jalal
Code
-------------------------------
// Created by Microsoft Visual C++.NET
#include "stdafx.h"
#include "test.h"
#include "testDlg.h"
#include ".\testdlg. h"
// I have added to use numeric_limits
#include <limits>
using namespace std;
void CtestDlg::OnBnC lickedSubmit()
{
double y;
// TODO: Add your control notification handler code here
UpdateData(TRUE );
y = numeric_limits< double>::min();
// Writing y in dialog box
x.Format("%.10f ", double(y));
UpdateData(FALS E);
}
Error massage:
-----------------------
warning C4003: not enough actual parameters for macro 'min'
error C2589: '(' : illegal token on right side of '::'
error C2059: syntax error : '::'
Comment