Thread: an error masseg

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    21

    an error masseg

    i have done a program in C but ther is an error maseeg
    it is:

    --------------------Configuration: ..... - Win32 Debug--------------------
    Compiling...
    ......c
    d:\program files\microsoft visual studio\vc98\include\conio.h(177) : warning C4229: anachronism used : modifiers on data are ignored
    D:\......c(33) : warning C4244: '=' : conversion from 'double ' to 'float ', possible loss of data
    D:\......c(47) : warning C4013: 'free' undefined; assuming extern returning int
    D:\......c(87) : warning C4013: 'sertch' undefined; assuming extern returning int
    D:\......c(112) : warning C4013: 'malloc' undefined; assuming extern returning int
    D:\......c(112) : warning C4047: '=' : 'struct node *' differs in levels of indirection from 'int '
    D:\......c(153) : warning C4013: 'system' undefined; assuming extern returning int
    Linking...
    ......obj : error LNK2001: unresolved external symbol _sertch
    Debug/......exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    ......exe - 2 error(s), 7 warning(s)

    forgut abut the warning i dont know what is
    the error....????

    please help me :

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    > forgut abut the warning i dont know what is
    the error....????

    Neither do I, without the code.

  3. #3
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633

    Re: an error masseg

    Originally posted by talal*c

    D:\......c(47) : warning C4013: 'free' undefined; assuming extern returning int
    D:\......c(112) : warning C4013: 'malloc' undefined; assuming extern returning int
    D:\......c(153) : warning C4013: 'system' undefined; assuming extern returning int
    It appears you have forgotten some header files. The remaining errors seem to be typos and/or logic errors, but it is hard to be certain without more information.
    Jason Deckard

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    9

    Error messages

    A few notes. The "conversion from double to float" is usually no big deal, but as a tip you should probably declare all your floating point variables to be doubles anyway, then you don't have to worry about this error. Some processors internally convert floats to doubles, then back to floats to store it for you, so you're just wasting time using floats. Most of the math functions you will use all use doubles instead of floats. A good rule of thumb is to only use floats when you know your numbers aren't that many decimal places, and you are really worried about memory, i.e. a big array of numbers or something.

    The standard functions malloc() and calloc() and system() all require the inclusion of the stdlib.h header file at the top of your code:
    #include <stdlib.h>
    If you look at the "man" or "help" page for those functions it should tell you what header file you need to include. You just include those header files because they contain the function prototypes, which means the compiler has information about what kind of function they are (what they return, what type of arguments get passed in) so that the compiler can complain if you aren't using them correctly.

    Your last two errors look like program bugs related to your use of pointers, again hard to say without seeing your code....

    Hope this helps.

Popular pages Recent additions subscribe to a feed