Menu

date function in devC++ compiler

Anonymous
2002-11-11
2012-09-26
  • Anonymous

    Anonymous - 2002-11-11

    hello folks.
    in school i use borland c++ compiler, but private and at work i use dev C++ because borland suxx and open source rules ;)
    in borland i use the following code:
    CDatum::CDatum(int day, string month, int year)
    {
        m_day=day;
       m_month=month;
       m_year=year;
    }

    CDatum::CDatum()
    {
        date datenow;

       getdate(&datenow);

       switch(datenow.da_mon)
       {
           case 1:m_month = "Januar";
                   break;
                    ...
        default:m_month = "unbekannt";
                   break;

       }

       m_day = datenow.da_day;
       m_year = datenow.da_year;
    }

    but it daoesnt work with dev, giving me the error message 18 D:\Proggen\schule\datum\datum.cpp
    `date' undeclared (first use this function)
    whats wrong? pls help me, im a nubie :(

     
    • Nobody/Anonymous

      i dont know.. but maibe the problem is you have others *.h files needed to include

      maibe in the borland project you have this include files in the right place

       
    • Nobody/Anonymous

      Wasn't there another thread on this very topic within the last week or so?  Search the forum.

      Wayne

       
    • Nobody/Anonymous

      There are a couple of threads on using time.h from a few days ago, here is one, with an example:

      http://sourceforge.net/forum/forum.php?thread_id=761999&forum_id=48211

      Wayne

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.