Programming with C - Direct insertion sort program

nagaya

Member
Mar 18, 2007
12,671
194
0
C:\>gcc a.c -o a
a.c: In function `main':
a.c:9: warning: return type of 'main' is not `int'
a.c:50:2: warning: no newline at end of file
C:\Users\Nagaya\AppData\Local\Temp/ccERcaaa.o(.text+0x2b):a.c: undefined reference to `clrscr'
collect2: ld returned 1 exit status

after removing clrscr() it works well with GCC....
 

Sudantha_s

Member
Feb 2, 2007
3,516
7
0
Assassin Brotherhood
nagaya said:
C:\>gcc a.c -o a
a.c: In function `main':
a.c:9: warning: return type of 'main' is not `int'
a.c:50:2: warning: no newline at end of file
C:\Users\Nagaya\AppData\Local\Temp/ccERcaaa.o(.text+0x2b):a.c: undefined reference to `clrscr'
collect2: ld returned 1 exit status

after removing clrscr() it works well with GCC....


clrscr() needs conio.h lib :yes:
 

patzz

Well-known member
  • Mar 2, 2008
    1,141
    603
    113
    {int i,temp,j=i;
    for(i=1;i<=N;i++)
    {
    temp=v;
    while((j!=0)&&(temp<v[j-1]))
    {
    v[j]=v[j-1];
    j--;
    }
    } v[j-1]=temp;
    }

    mekath try karapan machan.ela okema anik patta wage meka