Multiple Structures Producing Error

This is a discussion on Multiple Structures Producing Error within the C++ Programming forums, part of the General Programming Boards category; Hey, I'm using dev-C++ (version 4.9.9.2) to make a text game. I defined several structures before int main(). When I ...

  1. #1
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229

    Multiple Structures Producing Error

    Hey,

    I'm using dev-C++ (version 4.9.9.2) to make a text game. I defined several structures before int main(). When I try to compile I receive a few errors saying:

    New types may not be defined in a return type,
    Two or more data types in a deceleration of `main',
    Extraneous `int' ignored,

    and,
    `main' must return `int'

    I didn't find anything about not being able to define more then one structure, but maybe there is?

    Thanks!
    David

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    Sounds like an issue of something like:

    Code:
    class foo{ };
    Edit: that semi-colon is bolded, I swear.

    Anyways.
    Yeah.
    Semi.
    Colon.
    Cancer.

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  3. #3
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Yeah, that was it, Thanks. I guess I should probably take some kind of test to see if I'm retarded.

    No Joke!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  3. using c++ in c code
    By hannibar in forum C Programming
    Replies: 17
    Last Post: 10-28-2005, 09:09 PM
  4. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 03:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21