Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT Pin
ThatsAlok20-Dec-05 1:15
ThatsAlok20-Dec-05 1:15 
GeneralRe: OT Pin
vikas amin20-Dec-05 1:53
vikas amin20-Dec-05 1:53 
GeneralRe: OT Pin
Eytukan20-Dec-05 3:29
Eytukan20-Dec-05 3:29 
GeneralRe: OT Pin
Eytukan20-Dec-05 3:27
Eytukan20-Dec-05 3:27 
GeneralRe: OT Pin
ThatsAlok20-Dec-05 17:18
ThatsAlok20-Dec-05 17:18 
Questionwhere is the mistake. Pin
iiscodered19-Dec-05 8:18
iiscodered19-Dec-05 8:18 
AnswerRe: where is the mistake. Pin
Chris Meech19-Dec-05 8:47
Chris Meech19-Dec-05 8:47 
AnswerRe: where is the mistake. Pin
toxcct19-Dec-05 21:35
toxcct19-Dec-05 21:35 
for time1 :

iiscodered wrote:
char *time1;
sprintf(time1,"%d:%d:%d",t->wHour,t->wMinute,t->wSecond);


this is not correct.
you have to allocate the memory space to then be able to write there (with the sprintf() call...).
for example, add this :
<font color=blue>char</font>* time1 = <font color=blue>new char</font>[10];
 
<font color=green>// ...and don't forget to delete this memory then....</font>
<font color=blue>delete</font>[] time1;



for t :
first of all, choose variable names that denote clearly what it is supposed to do !!! t is not an explicit name.

iiscodered wrote:
LPSYSTEMTIME t;
GetLocalTime(t);


same this again here.
t is not allocated...

it seems to me that you are new to C++, aren't you ?
moreover, the compiler might have told you a clear enough message of what was going wrong in you code... read them with interrest, ,compiler is your friend !



TOXCCT >>> GEII power
[toxcct][VisualCalc 2.20][VisualCalc 3.0]
AnswerRe: where is the mistake. Pin
Eytukan19-Dec-05 21:59
Eytukan19-Dec-05 21:59 
QuestionRe: where is the mistake. Pin
toxcct19-Dec-05 22:05
toxcct19-Dec-05 22:05 
AnswerRe: where is the mistake. Pin
Eytukan19-Dec-05 22:19
Eytukan19-Dec-05 22:19 
AnswerRe: where is the mistake. Pin
Eytukan19-Dec-05 22:21
Eytukan19-Dec-05 22:21 
AnswerRe: where is the mistake. Pin
Blake Miller20-Dec-05 4:37
Blake Miller20-Dec-05 4:37 
Questionstatic data member. Pin
paper6719-Dec-05 7:56
paper6719-Dec-05 7:56 
AnswerRe: static data member. Pin
PJ Arends19-Dec-05 11:38
professionalPJ Arends19-Dec-05 11:38 
GeneralRe: static data member. Pin
vikas amin19-Dec-05 19:02
vikas amin19-Dec-05 19:02 
GeneralRe: static data member. Pin
Eytukan19-Dec-05 21:27
Eytukan19-Dec-05 21:27 
QuestionGraphics in dialog window Pin
josephmanu19-Dec-05 7:20
josephmanu19-Dec-05 7:20 
AnswerRe: Graphics in dialog window Pin
Chris Losinger19-Dec-05 7:37
professionalChris Losinger19-Dec-05 7:37 
GeneralRe: Graphics in dialog window Pin
josephmanu19-Dec-05 11:24
josephmanu19-Dec-05 11:24 
Questioni need an example Pin
markshte19-Dec-05 5:33
markshte19-Dec-05 5:33 
QuestionTape Drive help required Pin
Touseef Afzal19-Dec-05 2:09
Touseef Afzal19-Dec-05 2:09 
AnswerRe: Tape Drive help required Pin
kakan19-Dec-05 2:40
professionalkakan19-Dec-05 2:40 
GeneralRe: Tape Drive help required Pin
Touseef Afzal19-Dec-05 3:29
Touseef Afzal19-Dec-05 3:29 
GeneralRe: Tape Drive help required Pin
kakan19-Dec-05 3:50
professionalkakan19-Dec-05 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.