LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 01-30-2012, 10:40 AM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 386

Rep: Reputation: 32
No std::set?


Hi, for some reason my Netbeans is puttig a red line under the text "set" when declaring a std::set variable (psuedo code illustrating this is pasted below). It is able to look up the header file <set> when I typed in the #include line, and containers such as std::map and std::vector work. Any idea why it's not understanding std::set? Would it be due to the stdc++ lib I have not having it? How can I check which stdc++ lib (ie GNU, Apache stdcxx, etc) is installed?

Code:
#include <set> 

main() { 
     std::set<std::string> setOfItems; 
}
 
Old 01-30-2012, 10:52 AM   #2
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Ubuntu
Posts: 1,160

Rep: Reputation: 232Reputation: 232Reputation: 232
Did you include the header file for string?
 
Old 02-07-2012, 11:38 AM   #3
grob115
Member
 
Registered: Oct 2005
Posts: 386

Original Poster
Rep: Reputation: 32
Sorry I missed the #include <string> line on this post but believe the original problem was my IDE wasn't looking up the include files properly. It's fixed now.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Template algorithm for std::vector and std::string CartmanYO Programming 4 09-08-2010 09:56 AM
what does the std:: do? RHLinuxGUY Programming 1 11-15-2005 01:01 PM
Std C++ Thaith Programming 7 08-28-2005 05:45 AM
knoppix std!! viral Linux - Software 1 11-30-2003 06:49 PM
C++ using namsespace std xaoc Programming 4 02-18-2003 07:28 PM


All times are GMT -5. The time now is 02:39 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration