LinuxQuestions.org
Visit Jeremy's Blog.
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 11-18-2011, 07:59 AM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 542

Rep: Reputation: 32
Compiler indicates typedef and declaration issue for Map type


Hi, am attempting to create a map type, and make a declaration.
Code:
typdef std::map<std::string, StructCustom> MapperType;
MapperType Mapper;
However, it gave me the following when I compiled. Any ideas?
Code:
error: âtypdefâ does not name a type
error: âMapperâ does not name a type
 
Old 11-18-2011, 08:08 AM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
You misspelled typedef

Last edited by johnsfine; 11-18-2011 at 08:15 AM.
 
1 members found this post helpful.
Old 11-18-2011, 10:44 AM   #3
grob115
Member
 
Registered: Oct 2005
Posts: 542

Original Poster
Rep: Reputation: 32
OMG! I can't believe this. I need a good C++ free editor. Any suggestions?
Also, can I do the following?
Quote:
MapperType Mapper[name] = {a = value_a, b = value_b};
Rather than this.
Quote:
MapperType Mapper;
StructCustom Custom = {a = value_a, b = value_b};
Mapper[name] = Custom;

Last edited by grob115; 11-18-2011 at 11:05 AM.
 
Old 11-18-2011, 11:44 AM   #4
SigTerm
Member
 
Registered: Dec 2009
Distribution: Slackware 12.2
Posts: 379

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by grob115 View Post
OMG! I can't believe this. I need a good C++ free editor. Any suggestions?
jEdit, Kate, KWrite, mc(mcedit), Microsoft Visual Studio Express, FAR manager with colorer plugin, vim, emacs.
 
  


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
[SOLVED] typedef in C ( Compiler Point of view ) ravishekhar.82 Programming 8 04-18-2010 09:12 PM
C declaration problem for a "typedef struct". Spirals Linux - Software 3 03-17-2008 07:52 AM
Implicit Declaration Compiler Error Mistro116@yahoo.com Programming 1 12-11-2005 04:24 AM
typedef defines which type? kpachopoulos Programming 1 11-10-2005 02:46 AM
g++ compiler error declaration does not declare anything Basiltp Programming 4 10-11-2004 11:29 AM

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

All times are GMT -5. The time now is 01:07 AM.

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