Hi guys,
I'm just starting into the world of C. As an exercise to help reiterate what I've learned I'm trying to make a madlib, for fun.
I'm running into issues trying to have the user input 2 variables of the same type.
For example, this works:
Code:
switch (answer) {
case 'Y':
case 'y':
printf("I'm so glad you want to play through my madlib!\n");
printf("First we'll need a Proper Noun: ");
scanf("%25s", propnoun);
printf("Now we need a Number: ");
scanf("%25d", &num1);
printf("testing %s, and %d.\n", propnoun, num1);
getchar ();
getchar ();
break;
But this gives a compile error of:
'Linker error' undefined reference to `Printf'
Code:
switch (answer) {
case 'Y':
case 'y':
printf("I'm so glad you want to play through my madlib!\n");
printf("First we'll need a Proper Noun: ");
scanf("%25s", propnoun);
printf("Now we need a Number: ");
scanf("%25d", &num1);
Printf("Sweet, give us another Number: ");
scanf("%23d", &num2);
printf("testing %s, %d, and %d.\n", propnoun, num1, num2);
getchar ();
getchar ();
break;
I'm sure I'm missing something very simple, a little guidance would be very appreciated.
Thanks in advance
Damien