|
Viorel. wrote: CString s;
s.Format("C:\\output%s.txt", ctime(NULL));
AfxMessageBox(s);
ok so I tried this but I still have that original error with the ctime() function of:
Debug Assertion Failed!
ProgramL...
File: ctime64.c
Line: 90
Expression: (timp != NULL)
Kitty5
|
|
|
|
|
This means that ctime does not accept NULL parameter. Try this:
time_t t = time(NULL);
and then path &t to ctime : ctime(&t) .
Hope it helps.
-- modified at 10:37 Friday 30th June, 2006
|
|
|
|
|
|
Pass NULL, get NULL. You should code this way:
#include <time.h>
time_t ltime;
time( <ime );
char *tm = ctime(<ime);
Best,
Jun
|
|
|
|
|
Jun Du wrote: time_t ltime;
time( <ime );
char="" *tm="ctime(<ime);" <="" blockquote="">
what is
|
|
|
|
|
In my previous post, can you see proper code? Your post looks weired here. There seem to be some problems with the posting, even I've disabled HTML tags. (I'm using Linux at work)
Anyhow, ctime(const time_t *time_val) works this way.
Best,
Jun
|
|
|
|
|
the code is see is:
#include <time.h>
time_t ltime;
time( <ime );
char *tm = ctime(<ime);
Kitty5
-- modified at 10:40 Friday 30th June, 2006
|
|
|
|
|
Ok, < should be &.
Best,
Jun
|
|
|
|
|
Don't use <> directly. Use the <> buttons above the smileys.
#include <ctime>
time_t t = time(NULL);
char *tm = ctime(&t);
char fileName[256] = "C:\\output";
strcat(fileName, tm);
strcat(fileName,".txt");
AfxMessageBox(fileName); Since you are using MFC, why mess with char* and strcat() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks for this DavidCrow wrote: Use the <> buttons above the smileys.
Best,
Jun
|
|
|
|
|
DavidCrow wrote: Since you are using MFC, why mess with char* and strcat()?
And on that note, why not just use CTime or COleDateTime? Both of which have format methods that will allow you to print out a timestamp in any format you wish.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Thanks you guys!
You all ROCK!
Kitty5
|
|
|
|
|
how we can put tooltips to the listbox items.
if i point to any particular item it must get tooltip and it will show the name of the item.
please help me,urgent.
murty.
vsn
|
|
|
|
|
See Here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Hello
I want to take a snapshot from a webcam and save it to a file . but I dont know how to do it , can you help me?
thanks
|
|
|
|
|
|
how we add WM_TIMECHANGE message to our project please tell me
vsn
|
|
|
|
|
In the header file declare
afx_msg void OnTimeChange();
In .cpp file
void CTEstDlg::OnTimeChange()
{
CDialog::OnTimeChange();
}
And in the begin message map section do this
ON_WM_TIMECHANGE()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
If it's an MFC application, use ClassWizard (Ctrl+W). Adding all of the pieces manually will work, but there's always the chance you could miss something.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi
how to add minimise button to modelless dialog box.
thanking you
Manjunath S
GESL
Bangalore
|
|
|
|
|
Right Click on the dialog . Go to properties>Styles Tab and select the minimize box (check box) option. That's it
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi
we created the dialog in win32 application using CreateDialog. In the properties of dialog window, I set the Minimise Box to TRUE. But the minimise option is not coming.
thanks
Manjunath S
GESL
Bangalore
|
|
|
|
|
hi amshu
i got it
thanks for ur suggestion
Manjunath S
GESL
Bangalore
|
|
|
|