Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncalculte time between two dates !!! Pin
pillsforkills2-Jun-09 6:23
pillsforkills2-Jun-09 6:23 
QuestionRe: calculte time between two dates !!! Pin
CPallini2-Jun-09 6:36
mveCPallini2-Jun-09 6:36 
QuestionRe: calculte time between two dates !!! Pin
David Crow2-Jun-09 7:48
David Crow2-Jun-09 7:48 
Questionsha256 test vector Pin
Bill Salibrici2-Jun-09 5:52
Bill Salibrici2-Jun-09 5:52 
QuestionControl CStatic, Height of FONT Pin
durban22-Jun-09 4:28
durban22-Jun-09 4:28 
AnswerRe: Control CStatic, Height of FONT Pin
Hamid_RT2-Jun-09 5:17
Hamid_RT2-Jun-09 5:17 
AnswerRe: Control CStatic, Height of FONT Pin
nyeboy2-Jun-09 6:55
nyeboy2-Jun-09 6:55 
GeneralRe: Control CStatic, Height of FONT Pin
ForNow1-Jul-15 8:08
ForNow1-Jul-15 8:08 
Questionfunction Pin
durban22-Jun-09 4:07
durban22-Jun-09 4:07 
AnswerRe: function Pin
Chris Losinger2-Jun-09 4:10
professionalChris Losinger2-Jun-09 4:10 
NewsRe: function Pin
CPallini2-Jun-09 6:29
mveCPallini2-Jun-09 6:29 
QuestionUrgent please from Ethiopia! Pin
mekonnenn2-Jun-09 3:51
mekonnenn2-Jun-09 3:51 
AnswerRe: Urgent please from Ethiopia! Pin
CPallini2-Jun-09 4:00
mveCPallini2-Jun-09 4:00 
AnswerRe: Urgent please from Ethiopia! Pin
David Crow2-Jun-09 4:22
David Crow2-Jun-09 4:22 
JokeRe: Urgent please from Ethiopia! Pin
Hamid_RT2-Jun-09 5:20
Hamid_RT2-Jun-09 5:20 
GeneralRe: Urgent please from Ethiopia! Pin
Luc Pattyn2-Jun-09 6:15
sitebuilderLuc Pattyn2-Jun-09 6:15 
AnswerRe: Urgent please from Ethiopia! Pin
nyeboy2-Jun-09 7:24
nyeboy2-Jun-09 7:24 
The following coding come from china.
It isn't writed by mine.

#include<stdio.h>

#define NUM 8 //定义数组的大小

int a[NUM+1];

int main()

{

int i,k,flag,not_finish=1,count=0;

i=1;

a[1]=1;

printf("The possible configuration of 8 queens are:\n");

while(not_finish)

{

while(not_finish&&i<=NUM)

{

for(flag=1,k=1;flag&&k<i;k++)

if(a[k]==a[i])flag=0;

for(k=1;flag&&k<i;k++)

if((a[i]==a[k]-(k-i))||(a[i]==a[k]+(k-i))) flag=0;

if(!flag)

 {

if(a[i]==a[i-1])

{

i--;

if(i>1&&a[i]==NUM)

a[i]=1;

else if(i==1&&a[i]==NUM)

not_finish=0;

 else a[i]++;

}

else if(a[i]==NUM) a[i]=1;

else a[i]++;

}

else if(++i<=NUM)

if(a[i-1]==NUM) a[i]=1;

else a[i]=a[i-1]+1;

 }

if(not_finish)

{

++count;

printf((count-1)%3?" [%2d]: ":" \n[%2d]: ",count);

for(k=1;k<=NUM;k++)

printf(" %d",a[k]);

if(a[NUM-1]<NUM) a[NUM-1]++;

else a[NUM-1]=1;

i=NUM-1;

}

}

}


studing is processing in this life.

Questionhow to get command line arguments in MFC Pin
hemlat2-Jun-09 3:41
hemlat2-Jun-09 3:41 
AnswerRe: how to get command line arguments in MFC Pin
David Crow2-Jun-09 3:43
David Crow2-Jun-09 3:43 
GeneralRe: how to get command line arguments in MFC Pin
hemlat2-Jun-09 4:01
hemlat2-Jun-09 4:01 
AnswerRe: how to get command line arguments in MFC Pin
Chris Losinger2-Jun-09 4:11
professionalChris Losinger2-Jun-09 4:11 
AnswerRe: how to get command line arguments in MFC Pin
nyeboy2-Jun-09 7:14
nyeboy2-Jun-09 7:14 
Questionhow to reset content of Listcontrol Pin
hemlat2-Jun-09 2:45
hemlat2-Jun-09 2:45 
AnswerRe: how to reset content of Listcontrol Pin
JBAK_CP2-Jun-09 2:51
JBAK_CP2-Jun-09 2:51 
GeneralRe: how to reset content of Listcontrol Pin
hemlat2-Jun-09 2:54
hemlat2-Jun-09 2:54 

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.