Click here to Skip to main content
15,886,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Win32 ListView control doesn't display any icons Pin
Richard MacCutchan18-Jul-13 0:39
mveRichard MacCutchan18-Jul-13 0:39 
GeneralRe: Win32 ListView control doesn't display any icons Pin
Richard MacCutchan17-Jul-13 7:50
mveRichard MacCutchan17-Jul-13 7:50 
QuestionHow can make smooth horizontal scroll on ListControl?? Pin
Sun-Mi Kang14-Jul-13 21:21
Sun-Mi Kang14-Jul-13 21:21 
AnswerRe: How can make smooth horizontal scroll on ListControl?? Pin
Richard MacCutchan14-Jul-13 22:24
mveRichard MacCutchan14-Jul-13 22:24 
QuestionHow to use listview_insertgroup with custom draw? Pin
JoneLe8614-Jul-13 18:39
JoneLe8614-Jul-13 18:39 
QuestionRe: How to use listview_insertgroup with custom draw? Pin
Richard MacCutchan14-Jul-13 21:19
mveRichard MacCutchan14-Jul-13 21:19 
AnswerRe: How to use listview_insertgroup with custom draw? Pin
JoneLe8619-Jul-13 8:42
JoneLe8619-Jul-13 8:42 
Questionbeginner question... recursive function Pin
Member 1008957914-Jul-13 5:40
Member 1008957914-Jul-13 5:40 
i have this code and it works fine.

C#
int fatt(int n)
{
    int fattoriale = 1;

    if(n==0)
        return fattoriale;
    else
        return fattoriale=n*fatt(n-1);
}

void main(void)
{
    printf("%d\n",fatt(10));

    fflush(stdin);
    getchar();
}


my question is why it works fine also here ?

C#
int fatt(int n)
{
    int fattoriale = 1;

    if(n==0)
        return fattoriale;
    else
        fattoriale=n*fatt(n-1);
}

void main(void)
{
    printf("%d\n",fatt(10));

    fflush(stdin);
    getchar();
}



in this, there aren't the return in the else.... i am using VS2010 and compile in .c .

thanks

ps: sorry for my english
AnswerRe: beginner question... recursive function Pin
Santhosh G_14-Jul-13 7:46
Santhosh G_14-Jul-13 7:46 
GeneralRe: beginner question... recursive function Pin
AlphaDeltaTheta14-Jul-13 17:40
AlphaDeltaTheta14-Jul-13 17:40 
GeneralRe: beginner question... recursive function Pin
Joe Woodbury15-Jul-13 10:43
professionalJoe Woodbury15-Jul-13 10:43 
GeneralRe: beginner question... recursive function Pin
Member 1008957916-Jul-13 6:33
Member 1008957916-Jul-13 6:33 
AnswerRe: beginner question... recursive function Pin
Erudite_Eric15-Jul-13 2:35
Erudite_Eric15-Jul-13 2:35 
AnswerRe: beginner question... recursive function Pin
Stefan_Lang15-Jul-13 22:24
Stefan_Lang15-Jul-13 22:24 
QuestionRelocated HDD sectors Pin
RomTibi13-Jul-13 8:20
RomTibi13-Jul-13 8:20 
AnswerRe: Relocated HDD sectors Pin
AlphaDeltaTheta13-Jul-13 20:34
AlphaDeltaTheta13-Jul-13 20:34 
GeneralRe: Relocated HDD sectors Pin
RomTibi14-Jul-13 6:37
RomTibi14-Jul-13 6:37 
Questionwhy void CView::PostNcDestroy() is called? Pin
yu-jian12-Jul-13 22:04
yu-jian12-Jul-13 22:04 
AnswerRe: why void CView::PostNcDestroy() is called? Pin
pasztorpisti13-Jul-13 5:27
pasztorpisti13-Jul-13 5:27 
AnswerRe: why void CView::PostNcDestroy() is called? Pin
Erudite_Eric15-Jul-13 3:08
Erudite_Eric15-Jul-13 3:08 
Question[SOLVED]Exec under windows Pin
AlphaDeltaTheta12-Jul-13 21:01
AlphaDeltaTheta12-Jul-13 21:01 
AnswerRe: Exec under windows Pin
Richard MacCutchan12-Jul-13 22:09
mveRichard MacCutchan12-Jul-13 22:09 
GeneralRe: Exec under windows Pin
AlphaDeltaTheta12-Jul-13 23:08
AlphaDeltaTheta12-Jul-13 23:08 
GeneralRe: Exec under windows Pin
Richard MacCutchan12-Jul-13 23:18
mveRichard MacCutchan12-Jul-13 23:18 
GeneralRe: Exec under windows Pin
AlphaDeltaTheta12-Jul-13 23:22
AlphaDeltaTheta12-Jul-13 23:22 

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.