The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk field declaration?? tonet Shell Programming and Scripting 1 09-12-2007 09:23 AM
How to typedef krishna_sicsr High Level Programming 1 06-01-2007 12:04 AM
Help with variable declaration dsravan Shell Programming and Scripting 1 12-08-2006 03:15 PM
Conflicting 'typedef' error - Which gcc switch to use? amitc SUN Solaris 0 09-18-2006 12:39 PM
Variable declaration laila63 High Level Programming 2 07-07-2004 04:37 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-13-2009
emitrax emitrax is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 38
typedef struct forward declaration

I've google a bit about this and couldn't find an answer. Actually I read that it can't be done.

Basically I've defined the following structure and typedef it as follows.
Code:
stuct Name {
};

typdef struct Name Name.
and right after it, defined some API that use it.

Code:
void blabla(Name* param);
etc...
Now, I'm developing a C++ class which methods use that "object", but I can't forward declare that structure, and including the header in the in header class seems dead wrong to me and I want to avoid it.

What's the best way to proceed ?

Thanks in advance,
S.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 01:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0