Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Use of typeof() for member data declaration (g++ bug?)

Reply
Thread Tools

Use of typeof() for member data declaration (g++ bug?)

 
 
M. Steinbach
Guest
Posts: n/a
 
      02-20-2004
---
class Real {
public:
double data;
};

class A {
public:
Real a;
typeof( a.data ) b; // Fails
};

--- g++ t.C:
t.C:10: invalid use of member `A::a'
t.C:10: ISO C++ forbids declaration of `b' with no type
Posted via Surge1


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
Reply With Quote
 
 
 
Reply

Thread Tools

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class declaration: TMember Member(); vs TMember Member; Skybuck Flying C++ 2 06-21-2011 02:36 PM
typedef and data member declaration subramanian100in@yahoo.com, India C++ 4 11-27-2007 09:45 AM
Class Member Data and Member Function Parameters - Should Parameters Be Data Members? Jason C++ 2 05-13-2006 07:11 AM
Use of typeof() for member data declaration (in g++) M. Steinbach C++ 1 02-20-2004 10:28 AM
How would I use qsort to sort a struct with a char* member and a long member - I want to sort in order of the long member Angus Comber C Programming 7 02-05-2004 06:41 PM



Advertisments