[ create a new paste ] login | about

Link: http://codepad.org/x5FDbyhI    [ raw code | output | fork ]

C++, pasted on Nov 11:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
int main()
void fun( char *a )
{
    int i=0,k;
    while(a[i]=='*') i++;
    k=i;
    while(a[i]!='\0')
    {
      if(a[i]!='*')
      a[k++]=a[i];
      i++;
     }
    a[k]='\0';
}


Output:
1
2
Line 3: error: expected initializer before 'void'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: