473,513 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP : visualC++ with STL roguewave => errorC2079(first' uses undefined class...

Hello,

I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.

XXXData.cpp
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h (63) : error C2079:
'first' uses undefined class 'Node'
f:\xxxxx\product\rw\rcb1.2.0\rm\include\vector(404 ) : see
reference to class template instantiation 'std::pair<class Node,bool>'
being compiled
f:\xxxxxx\indexedvector.hpp(175) :
see reference to class template instantiation 'std::vector<struct
std::pair<class Node,bool>,class
std::allocator<struct std::pair<class Node,bool> >
' being compiled

f:\xxxxxx\node.hpp(147) :
see reference to class template instantiation 'xxx::IndexedVector<class
Node>' being compiled
Generating Code...
Error executing cl.exe.
=================================================
in f:\xxxxxx\indexedvector.hpp(175) : code is

static vector <pair <T, bool> > make_data (const vector <T>&
data);

// Data Members for Class Attributes
vector <pair <T, bool> > _data;
==================================================
What I understand as it's not possible to compile with visual c++ and
using roguewave STL this kind of code =>

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}

thanks

May 11 '06 #1
8 2530
ak*******@yahoo.fr wrote:
Hello,

I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.

Post a complete example that shows your problem and someone might be
able to tell you what's wrong.

--
Ian Collins.
May 11 '06 #2
In fact the pb is due to this code => with visual c++ and using
roguewave STL this kind of code bellow gives an
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h (63) : error C2079:
'first' uses undefined class 'Tempo'.

With STL microsoft no problem. Unfortunately I must use roguewave STL.

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}

May 11 '06 #3
ak*******@yahoo.fr wrote:
In fact the pb is due to this code => with visual c++ and using
roguewave STL this kind of code bellow gives an
f:\xxxxx\product\rw\rcb1.2.0\rm\include\rw\_pair.h (63) : error C2079:
'first' uses undefined class 'Tempo'.

With STL microsoft no problem. Unfortunately I must use roguewave STL.

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}

So you are storing a class that contains a vector in a vector? Lucky
for you it doesn't compile!

--
Ian Collins.
May 11 '06 #4
ak*******@yahoo.fr wrote:
What I understand as it's not possible to compile with visual c++ and
using roguewave STL this kind of code =>

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;

}


Think: Tempo contains a vector of Tempos. Each of these tempos contain
a vector of Tempos. Each of these tempos then contain a vector of
Tempos... Where do we stop?

Either rethink your design or store pointers to dynamically allocated
Tempos. That way, you'll only have the Tempos you need.
Jonathan

May 12 '06 #5
? your answers are welcomed anyway....It is compiling/working without
problem using STL microsoft instead of STL Roguewave.
The idea is recursivity and I must reused existing code using Roguewave
:-(

May 12 '06 #6
ak*******@yahoo.fr wrote:
Jonathan Mcdougall wrote
akira2...@yahoo.fr wrote:
What I understand as it's not possible to compile with visual c++ and
using roguewave STL this kind of code =>

class Tempo
{
...
std::vector<std::pair<Tempo,bool>> _data;
}
Think: Tempo contains a vector of Tempos. Each of these tempos contain
a vector of Tempos. Each of these tempos then contain a vector of
Tempos... Where do we stop?

Either rethink your design or store pointers to dynamically allocated
Tempos. That way, you'll only have the Tempos you need.


? your answers are welcomed anyway....It is compiling/working without
problem using STL microsoft instead of STL Roguewave.
The idea is recursivity and I must reused existing code using Roguewave


Actually, my answer was plain wrong, just forget it. This:

# include <vector>
# include <utility>

class B
{
std::vector<std::pair<B, bool> > v;
};

compiles fine and looks good.

Perhaps if you post the exact code that fails to compile we'll be able
to help you.
Jonathan

May 12 '06 #7
Thanks Jonathan,

But are you using RogueWave STL? for me your code does
the same error with visual C++ and STL roguewave.

May 12 '06 #8
ak*******@yahoo.fr wrote:
I get this error while compiling with visualc++ and STL roguewave. With
STL microsoft everything work fine.


What version of VC++? VC++ 6.0 has poor template support. If you are
using VC++ 6.0, try upgrading your compiler.

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
May 12 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3371
by: Karl von Laudermann | last post by:
I'm using Borland JBuilder at work, and its GUI building tool generates code that looks like this: someImageIcon = new ImageIcon(MyAppMainFrame.class.getResource("Thing.PNG")); I can replace...
4
2732
by: Grey Plastic | last post by:
I have several classes that all keep track of static data. However, the manner that they keep track of static data is identical, and so I'm using the template<class Child> class Parent { ... };...
1
1539
by: Chuck | last post by:
I have a question tht I'm sure someone out there can answer. A friend of mine has developed an Access application that is a very business specific (niche type of application). The application...
4
5061
by: Gary li | last post by:
Hi, all I find "template template" class cann't been compiled in VC6 but can ok in Redhat9. I write a test program like as: template< template<class> class T> class A { }; int main() {...
1
7277
by: sharmadeep1980 | last post by:
Hi All, I am facing a very unique problem while compling my project in "Release" build. The project is building in DEBUG mode but giving linking error on Release build. Here is the error:...
3
2669
by: Demoris | last post by:
I have a class that I believe should work. I've compared it to previous programs I've written, compared it to examples from my professor, to examples in my textbook, but can't see why I get the...
4
2163
by: Milan Krejci | last post by:
int first=15,latest=15; QString typ=NULL; std::map<int,std::string>::iterator i; for(i = SeznamPracovniDoby.begin(); i != SeznamPracovniDoby.end(); i++) { if (typ==NULL) typ=i->second.c_str(); if...
0
1447
by: Academia | last post by:
The Help Class example requires only a simple copy, paste into a form and run. Which I did. For it to relate to what I am trying to find out I set the "Help Navigator) combobox to "Topic" I...
8
5856
by: stefman123 | last post by:
hey guys just wondering if you can help with this error ive started receiving(im not brilliant at coding so it probs something obvious) Notice: Undefined variable: lang in...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.