To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. I am creating a C program using C++ ,it gives me error of scanf.Use

  • Thread starter Thread starter BijalPatel
  • Start date Start date
B

BijalPatel

Guest
#include<stdio.h>
#include<conio.h>
#define _CRT_SECURE_NO_WARNINGS
void main(){
int x,y,temp;
printf("Enter two numbers :");
scanf("%d,%d",&x,&y);
printf("\nValue before swapping x=%d ,y=%d",x,y);
temp=x;
x=y;
y=temp;
printf("\nValue after swapping x=%d ,y=%d",x,y);

}


I have written above pieace of code to simply swap two numbers.

But is is asking me to use scanf_s instead scanf.Y is it so...?


Please reply me asap

Continue reading...
 
Back
Top