I just want to know what these errors mean that i got from my code..

This is a discussion on I just want to know what these errors mean that i got from my code.. within the C Programming forums, part of the General Programming Boards category; error: ./Emprecord.h: NO such file or directory error: conflicting declaration types for a^qsorta^ note: previous declaration of a^qsorta^ was here ...

  1. #1
    Registered User arti's Avatar
    Join Date
    May 2010
    Posts
    108

    Unhappy I just want to know what these errors mean that i got from my code..

    error: ./Emprecord.h: NO such file or directory
    error: conflicting declaration types for a^qsorta^
    note: previous declaration of a^qsorta^ was here
    In function a^qsorta^
    error: incompatible types when initializing type a^inta^ using type a^Emprecorda^
    error: a^Emprecorda^ has no member named a^finisha^
    warning: passing argument 2 of a^strcmpa^ makes a pointer from integer without cast
    /usr/include/string.h:142: note; expected a^const char *a^ but argument is of type a^inta^
    error: a^Emprecorda^ has no member named a^finisha^
    warning: passing argument 2 of a^strcmpa^ makes a pointer from integer without cast
    /usr/include/string.h:142: note; expected a^const char *a^ but argument is of type a^inta^
    error: expected identifier or a^(a^ before a^[a^ token
    error: expected identifier or a^(a^ before a^[a^ token



    The code is for anyone who wants to see it. Just so...I don't know
    #include<stdio.h>
    #include<string.h>
    #include "./Emprecord.h"
    #define SIZE 5
    typedef struct Emprecord
    Code:
      {
        char last[21];
        char first[21];
       }
    Emprecord;
    void qsort(int list[], int start, int finish);
    void showtable(int list[]);



    void qsort(Emprecord *list, int start, int finish)
    Code:
    {
     int left=start;
     int right=finish;
     int pivot=list[(start+finish)/2];
     
     while(left<right)
     
    Code:
    {
       while(strcmp(list[left].finish, pivot)<0)
         left++;
       while(strcmp(list[right].finish,pivot)>0)
         right--;
       if (left<=right);
       
    Code:
    {
        Emprecord temp[1];
        temp[0]=list[left];
        Emprecord[left]=Emprecord[right];
        Emprecord[right]=temp[0];
          left++;
         right--;
       }
    }
    if(start<right) qsort(list, start, right); if(left<finish) qsort(list, finish, left); }
    void showtable(int list[])
    Code:
    {
     int i;
     for(i=0;i<SIZE;i++)
      printf("This is the unsorted names",list[i]);
    }

  2. #2
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115
    error: ./Emprecord.h: NO such file or directory
    Code:
    #include "./Emprecord.h"
    You are not supposed to attach a ./ with a file while including it .
    Last edited by AnishaKaul; 05-10-2010 at 12:31 AM.

  3. #3
    Noob AnishaKaul's Avatar
    Join Date
    Jan 2010
    Location
    Gurgaon, India
    Posts
    115
    error: conflicting declaration types for a^qsorta^
    note: previous declaration of a^qsorta^ was here
    Code:
    void qsort(int list[], int start, int finish);
    void qsort(Emprecord *list, int start, int finish)
    See the types of the first arguments of the. They are differing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  2. << !! Posting Code? Read this First !! >>
    By kermi3 in forum Linux Programming
    Replies: 0
    Last Post: 10-14-2002, 02:30 PM
  3. RAM/Swap Memory Code Errors
    By ghe1 in forum Linux Programming
    Replies: 2
    Last Post: 04-01-2002, 07:37 AM
  4. << !! Posting Code? Read this First !! >>
    By biosx in forum C++ Programming
    Replies: 1
    Last Post: 03-20-2002, 12:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21