Solved

STL valarray problem

Posted on 2002-04-15
7
311 Views
Last Modified: 2013-12-14
Hi,
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?
0
Comment
Question by:borlip
7 Comments
 
LVL 4

Expert Comment

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

Author Comment

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

Expert Comment

by:Axter
ID: 6942249
Post the code that you're trying to use the valarray include.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 30

Expert Comment

by:Axter
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.
0
 

Author Comment

by:borlip
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.
0
 
LVL 30

Expert Comment

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

Accepted Solution

by:
Zoppo earned 50 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,

ZOPPO
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

912 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now