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

C / C++ / MFC

 
GeneralRe: VC++ console application - client / Server Pin
jeron124-Sep-14 3:58
jeron124-Sep-14 3:58 
GeneralRe: VC++ console application - client / Server Pin
Pouria Polouk24-Sep-14 8:19
Pouria Polouk24-Sep-14 8:19 
GeneralRe: VC++ console application - client / Server Pin
jeron124-Sep-14 9:16
jeron124-Sep-14 9:16 
GeneralRe: VC++ console application - client / Server Pin
Pouria Polouk25-Sep-14 5:33
Pouria Polouk25-Sep-14 5:33 
QuestionRe: VC++ console application - client / Server Pin
jeron125-Sep-14 11:53
jeron125-Sep-14 11:53 
AnswerRe: VC++ console application - client / Server Pin
Pouria Polouk26-Sep-14 7:25
Pouria Polouk26-Sep-14 7:25 
GeneralRe: VC++ console application - client / Server Pin
jeron126-Sep-14 7:41
jeron126-Sep-14 7:41 
QuestionRegarding Parameter in C (GCD of 2 Numbers) Pin
Driganka Mandal19-Sep-14 19:02
Driganka Mandal19-Sep-14 19:02 
Here is my Program
In the line int GCD(num1,num2) I get the warning
" warning: parameter names (without types) in function declaration [enabled by default]| "
But if I use int GCD(int a,int b) the warning is not there.
NOTE - In both cases the program runs perfectly.
I am a newbie, so I would appreciate if someone helps me regarding this.... Smile | :)
/* I am using mingw with code blocks */
VB
#include<math.h>
#include<stdio.h>
#include<conio.h>

int GCD(num1,num2);
main()
{
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\n\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
}
int GCD(int a ,int b)
{
    if (b>a)
        return GCD(b,a);
    if(b==0)
        return a;
    else
        return GCD(b,a%b);
}





VB
#include<math.h>
#include<stdio.h>
#include<conio.h>

int GCD(num1,num2);
main()
{
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\n\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
}
int GCD(int a ,int b)
{
    if (b>a)
        return GCD(b,a);
    if(b==0)
        return a;
    else
        return GCD(b,a%b);
}

VB
#include<math.h>
#include<stdio.h>
#include<conio.h>

int GCD(num1,num2);
main()
{
    int num1,num2;
    printf("\n\tEnter the two numbers whose GCD is to be found : ");
    scanf("%d %d",&num1,&num2);

    printf("\n\tGCD of %d & %d is %d",num1,num2,GCD(num1,num2));
    getch();
}
int GCD(int a ,int b)
{
    if (b>a)
        return GCD(b,a);
    if(b==0)
        return a;
    else
        return GCD(b,a%b);
}

AnswerRe: Regarding Parameter in C (GCD of 2 Numbers) Pin
Richard MacCutchan19-Sep-14 21:17
mveRichard MacCutchan19-Sep-14 21:17 
GeneralRe: Regarding Parameter in C (GCD of 2 Numbers) Pin
Driganka Mandal19-Sep-14 22:18
Driganka Mandal19-Sep-14 22:18 
GeneralRe: Regarding Parameter in C (GCD of 2 Numbers) Pin
Richard MacCutchan19-Sep-14 22:23
mveRichard MacCutchan19-Sep-14 22:23 
AnswerRe: Regarding Parameter in C (GCD of 2 Numbers) Pin
Albert Holguin22-Sep-14 3:41
professionalAlbert Holguin22-Sep-14 3:41 
QuestionIs it possible of getting same answer for inverse of matrix 100*100 dimension using gsl lib and matlab? Pin
mybm119-Sep-14 0:19
mybm119-Sep-14 0:19 
AnswerRe: Is it possible of getting same answer for inverse of matrix 100*100 dimension using gsl lib and matlab? Pin
CPallini19-Sep-14 1:50
mveCPallini19-Sep-14 1:50 
QuestionExtraction dictionary Software database Pin
محمد الذوادي18-Sep-14 18:12
محمد الذوادي18-Sep-14 18:12 
AnswerRe: Extraction dictionary Software database Pin
Richard MacCutchan18-Sep-14 22:11
mveRichard MacCutchan18-Sep-14 22:11 
QuestionGoogle's PageRank Pin
Ștefan-Mihai MOGA17-Sep-14 17:24
professionalȘtefan-Mihai MOGA17-Sep-14 17:24 
SuggestionRe: Google's PageRank Pin
David Crow18-Sep-14 17:34
David Crow18-Sep-14 17:34 
QuestionForce a popup menu hosted in a CDialog to show up its accelerators keys Pin
sdancer7517-Sep-14 2:54
sdancer7517-Sep-14 2:54 
AnswerRe: Force a popup menu hosted in a CDialog to show up its accelerators keys Pin
enhzflep17-Sep-14 16:46
enhzflep17-Sep-14 16:46 
GeneralRe: Force a popup menu hosted in a CDialog to show up its accelerators keys Pin
sdancer7517-Sep-14 20:56
sdancer7517-Sep-14 20:56 
GeneralRe: Force a popup menu hosted in a CDialog to show up its accelerators keys Pin
enhzflep17-Sep-14 23:50
enhzflep17-Sep-14 23:50 
GeneralRe: Force a popup menu hosted in a CDialog to show up its accelerators keys Pin
sdancer7518-Sep-14 0:20
sdancer7518-Sep-14 0:20 
QuestionMigrating from Win.MFC to Linux/??? Pin
Bram van Kampen16-Sep-14 16:30
Bram van Kampen16-Sep-14 16:30 
AnswerRe: Migrating from Win.MFC to Linux/??? Pin
M@dHatter16-Sep-14 17:27
M@dHatter16-Sep-14 17:27 

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.