#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
int main()
{
int ActChoice=0;
//do
//{
printf("What Activity were you doing?");
printf("\n1. Running" );
printf("\n2. Swimming");
printf("\n3. Cycling" );
scanf("\n%d",ActChoice);
/*if(ActChoice == 1)
{
RunEdit();
}
else if(ActChoice == 2)
{
SwimEdit();
}
else if(ActChoice == 3)
{
CyclEdit();
}*/
//}
// while(1==1);
getch();
}
Here i have a very simple piece of code designed to choose a desired function, however, on running this program, it crashes after i input "ActChoice" .
I don't know whether this is a mistake i have in my code here, or the code further down, But it seems to break at the scan.
Edit: I forgot the & , i'm actually retarded