Open rameshdk12 opened 10 months ago
This error is caused by the min/max macros of
Solution: The issue can be solved by adding NOMINMAX
to ‘Preprocessor Definitions’:
Click on ‘Project’ in the menu bar at the top of the Visual Studio window and select ‘Properties’.
(or right click on your project in Visual Studio, select Properties)
And then goto C/C++ → Preprocessor, add NOMINMAX
to ‘Preprocessor Definitions’.
Thanks for your response The given solutions did not work for me. I put NOMINMAX in preprocessor definitions
it was confusing the max() of limits.h with the macro max
added the following two lines in the beginning of dynarray.h
``
and adding following to end of dynarray..h
``
Now it compiles without errors.
Hi, Does it work with win32 MFC projects in MSVC 17?. I am using the neat version of dynarray.hpp
I am creating an array in global namespace as below. If I include stdafx.h it doesn't compile.
dynarray.hpp line 920 '(' illegal token on right side of :: is the first error.
//code begins
include "StdAfx.h"
include "dynarray.hpp"
vla::dynarray<int, 3> arr(1, 1, 1, 0);
//a dummy function void fun() {
}
//code ends
Thanks Ramesh D