Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


STL valarray problem

Posted on 2002-04-15
Medium Priority
Last Modified: 2013-12-14
I'm programming in VS 6.0.
When I'm adding #include <valarray>
to one of my files and compile I receive 24 errors and 2 warnings in c:\program files\microsoft visual studio\vc98\include\valarray
mostly:"(167) : see reference to class template instantiation 'std::valarray<_Ty>' being compiled"

How can I fix this?
Question by:borlip
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6942045
Could you post the code being complained about?

Author Comment

ID: 6942217
There is no code!!!!
just single line:
#include <valarray>
LVL 30

Expert Comment

ID: 6942249
Post the code that you're trying to use the valarray include.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 30

Expert Comment

ID: 6942253
The problem is most-likely in your code, and not in the valarray file.
The compiler will point to the valarray file as the source of the error, but only because something in that file doesn't agree with your code.

Author Comment

ID: 6942428
I agree , apparently something is wrong with my code.
But how can I figure out what is it. Without that single line everything is perfect....
There are tens of classes and files.
LVL 30

Expert Comment

ID: 6942452
Post the first 4 compile errors that you get.
LVL 31

Accepted Solution

Zoppo earned 150 total points
ID: 6942515
Hi borlip,

I think problem is that some STL functions conflict with WinAPI macros (i.e. min, max) ...
so, you can simply include <valarray> before you include <windows.h>.

hope that helps,


Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question