- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm having some trouble compiling the following code snippet
#include <algorithm> #define SIZE (1000) struct S { int *vect; }; int main() { struct S* s = (struct S*)(malloc(sizeof(struct S))); s->vect = (int*)(malloc(sizeof(int) * SIZE)); for(int i = 0; i < SIZE; i++) { s->vect = i; } std::sort(s->vect, s->vect + SIZE); }
The compiler returns the following error related to the std::sort call
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.12.25827\include\algorithm(3138): error : access violation 1> return (pair<_RanIt, _RanIt>(_Pfirst, _Plast)); 1> ^
I'm using visual studio enterprise 2017 version 15.5.2 and the intel compiler 64 bit version 17.0.4.210 Build 20170411.
The code used to work before the latest visual studio update.
Thanks in advance.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Luca,
VS studio update 15.5.x breaks Intel Compiler 2017 unfortunately. Your only option at present is to go back to 15.4.4 (reinstall Visual Studio) or to install Intel Compiler 2018 Update 1.
Sorry for the bad news.
Happy holidays.
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jason,
thank you for your reply.
Happy holidays to you too!
Luca
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page