Thread: Problems with Global Structure

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    2

    Problems with Global Structure

    Hi,
    I could compile my code in VC++ 6 but it would not compile in BC, it wouldn't identify global structure.

    If anyone has patience to look at my code please dom, I know its a pain to look thru the code but I couldn't explain my problem. I am attaching my file to this message.

    Thanks in advance
    Bijju

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    When you compiled it with vc++, you must have compiled it as a C++ program, because the syntax you used is C++ specific.

    This is what you need to fix
    a= (struct set *)calloc(setSize,sizeof( struct set));
    b= (struct set *)calloc(setSize,sizeof( struct set));

    You need to specify that set is a struct in these 2 lines

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 02-14-2006, 09:04 AM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. structure problems in windows program.
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 04-19-2004, 06:18 PM
  4. Realloc problems with sturcture array inside structure
    By daveyand in forum C Programming
    Replies: 2
    Last Post: 03-29-2004, 06:48 AM
  5. Dynamically SIzed Global Matrix problems
    By Josh Kasten in forum C++ Programming
    Replies: 2
    Last Post: 01-18-2003, 11:51 PM