revise the sequence class to use a dynamic array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Anan18
    New Member
    • Oct 2006
    • 11

    revise the sequence class to use a dynamic array

    Hi there,

    I revised my sequence class, from the last homework to use a dynamic array to store items, i am getting an error and 4 warnings, i also provided my header file, as well as the implementation file, can someone please help me out hear, my brains are beyond fried now, highly appreciated

    1>------ Build started: Project: Assignment3, Configuration: Debug Win32 ------
    1>Compiling...
    1>sequence2.cx x
    1>c:\users\mrah il\documents\vi sual studio 2005\projects\a ssignment3\assi gnment3\sequenc e2.cxx(32) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO _WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
    1> c:\program files\microsoft visual studio 8\vc\include\xu tility(2370) : see declaration of 'std::copy'
    1>c:\users\mrah il\documents\vi sual studio 2005\projects\a ssignment3\assi gnment3\sequenc e2.cxx(61) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO _WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
    1> c:\program files\microsoft visual studio 8\vc\include\xu tility(2370) : see declaration of 'std::copy'
    1>c:\users\mrah il\documents\vi sual studio 2005\projects\a ssignment3\assi gnment3\sequenc e2.cxx(99) : warning C4996: 'std::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO _WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
    1> c:\program files\microsoft visual studio 8\vc\include\xu tility(2370) : see declaration of 'std::copy'
    1>c:\users\mrah il\documents\vi sual studio 2005\projects\a ssignment3\assi gnment3\sequenc e2.cxx(207) : warning C4715: 'main_savitch_4 ::sequence::cur rent' : not all control paths return a value
    1>Linking...
    1>LINK : fatal error LNK1561: entry point must be defined
    1>Build log was saved at "file://c:\Users\Mrahil \Documents\Visu al Studio 2005\Projects\A ssignment3\Assi gnment3\Debug\B uildLog.htm"
    1>Assignment3 - 1 error(s), 4 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Several hundred lines of code removed, read the guidelines
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    The first 3 warnings are about functions Microsoft has decided to declare deprecated due to security issues and can probably be ignored for now (particularly if you want your code to be portable).

    2005\projects\a ssignment3\assi gnment3\sequenc e2.cx x(207) : warning C4715: 'main_savitch_4 ::sequence::cur rent' : not all control paths return a value

    This warning is because main_savitch_4: :sequence::curr ent returns a value but somewhere in the code there is a path of execution of the function that does not return a value(I am surprised it is not an error). Check the function make sure that all return statements return a value and that it is not possible to get the end of the function with hitting a return statement.

    1>LINK : fatal error LNK1561: entry point must be defined

    The linker is complaining that the entry point (main normally) does not exist. Have you left a file out of your build? or accidentally made an edit in your entry point function name?

    Comment

    Working...