LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-10-2010, 08:17 PM   #1
mjm461
LQ Newbie
 
Registered: Feb 2004
Posts: 11

Rep: Reputation: 0
compile issue


This compiles against g++ template headers but not against the icpc headers. Any ideas?

Code:
#include <string>
#include <vector>

template <typename T>
class MyList : public std::vector< T* >{
};

template <typename T>
class MyListIterator : public MyList<T>::iterator{
};

int main(){
	MyListIterator< int > test;
	return 0;
}
 
Old 02-10-2010, 09:37 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Maybe you could post an exact error message?

It would also be helpful to know what compiler you're using, and exactly what these "ICPC Headers" are.

IMHO .. PSM
 
Old 02-10-2010, 09:53 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
with things like "MyList" and "MyListIterator"

this is looking like homework
 
Old 02-11-2010, 06:21 AM   #4
mjm461
LQ Newbie
 
Registered: Feb 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Not homework, just a test program for some code I am trying to port from gcc to intel. By intel headers, i mean -I/opt/intel/cce/inclucde/c++ instead of using /usr/include headers. Error is something like "class "MyList" has no memor class "iterator".
 
Old 02-11-2010, 10:11 AM   #5
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
could be that you are looking for something like that, but you post to less code to see what you need

Code:
template <typename T>
class MyList : public std::vector< T* >{
	typedef typename std::vector< T* >::iterator iterator ;
};
before reinventing the wheel you might take a look here
http://www.boost.org/doc/libs/1_42_0...container.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
libdnet compile issue scoban Slackware 4 01-03-2010 01:08 PM
nautilus compile issue exvor Linux - Software 1 05-06-2006 06:09 PM
Winex compile issue redhatbadboi Linux - Games 3 03-04-2005 04:35 PM
2.6.9 Compile Issue capnpayne Linux - Newbie 2 11-29-2004 10:41 PM
kernel compile issue drisay Slackware 2 10-17-2004 12:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration