LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-30-2003, 12:14 PM   #1
dominik81
Member
 
Registered: Sep 2003
Location: Germany
Distribution: Ubuntu 7.10
Posts: 54

Rep: Reputation: 15
C: global typedefs


Hi!

I'm having trouble with typedefs in C (using gcc 3.3.1).

This is what I have:
- file "main.c"
- file "objects.c"
- file "objects.h" with "typedef struct { ... } objects;" in it.

I can use the type "objects" in main.c and initialize variables of this type. But I cannot create variables from within objects.c! What am I doing wrong? It does work however when I put the typedef again in my objects.c but I think that's quite redundant.
 
Old 11-30-2003, 02:34 PM   #2
coolman0stress
Member
 
Registered: Jun 2003
Location: Toronto, Ontario, Canada
Posts: 288

Rep: Reputation: 30
are you including "objects.h" in "objects.c"?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
I like global warming. slapNUT General 177 12-12-2006 04:04 AM
C Global Declaration Aju Programming 3 09-29-2005 04:21 AM
Global menus jsfour Slackware 1 12-04-2003 03:09 PM
Global access in C++ jpc82 Programming 3 11-16-2003 04:00 PM
Global Settings mikeshn Linux - Software 1 07-22-2003 07:42 PM

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

All times are GMT -5. The time now is 02:35 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