|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Smurf Join Date: Feb 2008
Posts: 6
![]() | It is illegal to use forward declarations with typedef names, as in: class string; void f(string& s); //illegal, string is a typedef name Even a typename won't do here: typename std::string; //still illegal void f(std::string& s); The problem with these forward declarations is that std::string is not a class, but a typedef name defined like this: typedef basic_string<char, char_traits<char>, allocator<char> >string; In order to generate the correct mangled name for the function f, the compiler has to see the non-typedef'd form of its argument. In other words, there is no escape from #including the header <string> in this case.
__________________ The cheerful looser is a winner |
| | |
|
| |||||||
| | #2 |
| Smurf Join Date: Jun 2007
Posts: 24
![]() | There should be a tutorial section for that because that is a top not a problem. |
| | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free PHPLD Template For v2.x Release (Fast Forward) | cocomo | Directories | 0 | 11-07-2006 12:36 PM |
| pr4/5 pages look forward to exchange links | burden924 | Link Exchange | 6 | 04-22-2006 10:17 AM |
| look forward to exchange link | burden924 | Wanted links | 2 | 03-01-2006 07:39 AM |
| pr4/5 pages look forward to exchange links | burden924 | Links for Sale | 1 | 02-28-2006 11:44 AM |