# A little C help for my friend



## [I.R.A]_FBi (Nov 3, 2009)

He's getting a "multiple declaration for 'printf'" error for this code block, personally i cant see it


```
switch (code)
     {
      	case '1':

          printf:("Very good!!");

          break;

         case '2':

          printf:("Keep it up!!");

          break;

         case '3':

          printf:("Nice job!!");

          break;

          case '4':

          printf:("Excellent");

          break;
     
     }
```


the erro comes up for the last 3 printf's


----------



## Kreij (Nov 4, 2009)

I'm pretty rusty on my C code, but maybe he could try something like this...

```
string CaseReturn;

switch (code)
{
    case '1' :
        CaseReturn = "Very Good!!";
        break;
    case '2' :
        CaseReturn = "Keep it up!!";
        break;
}

printf:(CaseReturn);
```

Sorry, it's been ages since I've used regular C code.


----------



## Oliver_FF (Nov 4, 2009)

```
printf:("Keep it up!!");
```

What's with the : after the function name and before the parameters?


```
printf("Keep it up!!");
```


----------



## Kreij (Nov 4, 2009)

I didn't know either, but I wasn't sure if he was using some strange compiler that wanted different syntax or something.


----------



## W1zzard (Nov 4, 2009)

ummm not printf:

just printf


```
switch ('0')
{
  case '1':
    printf("Very good!!");
    break;
```



Kreij said:


> I didn't know either, but I wasn't sure if he was using some strange compiler that wanted different syntax or something.


then it wouldn't be c anymore


----------



## [I.R.A]_FBi (Nov 5, 2009)

damn ... blame the cocomania i was having when he came by and asked me


----------

