Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未能在Eclipse CDT IDE中执行MI命令-var create_Eclipse_Error Handling_Compiler Errors_Eclipse Cdt - Fatal编程技术网

未能在Eclipse CDT IDE中执行MI命令-var create

未能在Eclipse CDT IDE中执行MI命令-var create,eclipse,error-handling,compiler-errors,eclipse-cdt,Eclipse,Error Handling,Compiler Errors,Eclipse Cdt,我有一个问题: causale char [256] Error: Multiple errors reported.\ Failed to execute MI command: -var-create - * &((lista).causale) Error message from debugger back end: Type struct list_element has no component named causale.\ Failed to execute MI co

我有一个问题:

causale char [256]  Error: Multiple errors reported.\
Failed to execute MI command: -var-create - * &((lista).causale) Error message from debugger back end: Type struct list_element has no component named causale.\
Failed to execute MI command: -data-evaluate-expression (lista).causale Error message from debugger back end: There is no member named causale.\
Failed to execute MI command: -var-create - * &((lista).causale) Error message from debugger back end: Type struct list_element has no component named causale.\ 
Unable to create variable object
我不知道是Eclipse(Eclipse IDE for C/C++Developers版本:Juno Service Release 2)问题还是我的代码中的错误。阅读错误报告似乎是我代码中的错误,但我无法更正。有人能帮我吗?谢谢:)

这是我的代码: Main.c

#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
int main ( )
{
char nomeFile [] = "20130613";
list l = NULL;

l = leggiPagamenti(nomeFile);

showList ( l );
system("PAUSE");
}
#include "element.h"
#include "list.h"
#define NULL 0
/* OPERAZIONI PRIMITIVE */
list  emptylist(void)       /* costruttore lista vuota */
{ return NULL; }

boolean  empty(list l)  /* verifica se lista vuota */
{ return (l==NULL); }

list  cons(element e, list l)
{ list t;       /* costruttore che aggiunge in testa alla lista */
  t=(list)malloc(sizeof(item));
  t->value=e;
  t->next=l;
  return(t);
}

element  head(list l) /* selettore testa lista */
{ if (empty(l)) exit(-2);
  else return (l->value);
}

list  tail(list l)         /* selettore coda lista */
{ if (empty(l)) exit(-1);
  else return (l->next);
}


void showList(list l) {
// NON PRIMITIVE
printf("[");
while (!empty(l)) {
printf("id cliente : %d id pagamento : %d importo : %.2f causale  : %s \n",head(l).idCliente,head(l).idPagamento,head(l).importo,head(l).causale );
l = tail(l);

} printf("]\n");
}
#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
#include "element.h"

list leggiPagamenti ( char *nomeFile )
{
element el ;
list lista = NULL;
FILE *f;
char car;
int count = 0;

        if ( ( f =  fopen  ( nomeFile , "r") ) == NULL  )
        {
            printf("Errore apertura file ");
            exit ( 1 );
        }

        while ( ( fscanf (f,"%d %d %f ",&el.idCliente,&el.idPagamento,&el.importo))> 0 )
        {
            while ( ( car = fgetc(f)) != '\n' && ( car != EOF ))
            {
                el.causale[count] = car;
                count++;
            }
            count = 0;
            lista = cons ( el, lista );


        }
        fclose ( f );
return lista;


}
list.h

#ifndef ELEMENT_H_
#define ELEMENT_H_
typedef struct
{
int idCliente;
int idPagamento;
float importo;
char causale [ 256 ];
} Pagamento;
typedef Pagamento element;
#endif /* ELEMENT_H_ */
#ifndef LIST_H_
#define LIST_H_
#include "element.h"

typedef struct  list_element {
    element value;
    struct list_element  *next; } item;

typedef  item* list;

typedef  int boolean;

/*  PROTOTIPI DI FUNZIONE (extern) */

/* PRIMITIVE  */ list emptylist(void); boolean empty(list); list cons(element, list); element head(list); list tail(list); void showList(list l);


#endif /* LIST_H_ */
#ifndef PAGAMENTI_H_
#define PAGAMENTI_H_
#include "list.h"
list leggiPagamenti ( char *nomeFile );

#endif /* PAGAMENTI_H_ */
pagamenti.h

#ifndef ELEMENT_H_
#define ELEMENT_H_
typedef struct
{
int idCliente;
int idPagamento;
float importo;
char causale [ 256 ];
} Pagamento;
typedef Pagamento element;
#endif /* ELEMENT_H_ */
#ifndef LIST_H_
#define LIST_H_
#include "element.h"

typedef struct  list_element {
    element value;
    struct list_element  *next; } item;

typedef  item* list;

typedef  int boolean;

/*  PROTOTIPI DI FUNZIONE (extern) */

/* PRIMITIVE  */ list emptylist(void); boolean empty(list); list cons(element, list); element head(list); list tail(list); void showList(list l);


#endif /* LIST_H_ */
#ifndef PAGAMENTI_H_
#define PAGAMENTI_H_
#include "list.h"
list leggiPagamenti ( char *nomeFile );

#endif /* PAGAMENTI_H_ */
list.c

#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
int main ( )
{
char nomeFile [] = "20130613";
list l = NULL;

l = leggiPagamenti(nomeFile);

showList ( l );
system("PAUSE");
}
#include "element.h"
#include "list.h"
#define NULL 0
/* OPERAZIONI PRIMITIVE */
list  emptylist(void)       /* costruttore lista vuota */
{ return NULL; }

boolean  empty(list l)  /* verifica se lista vuota */
{ return (l==NULL); }

list  cons(element e, list l)
{ list t;       /* costruttore che aggiunge in testa alla lista */
  t=(list)malloc(sizeof(item));
  t->value=e;
  t->next=l;
  return(t);
}

element  head(list l) /* selettore testa lista */
{ if (empty(l)) exit(-2);
  else return (l->value);
}

list  tail(list l)         /* selettore coda lista */
{ if (empty(l)) exit(-1);
  else return (l->next);
}


void showList(list l) {
// NON PRIMITIVE
printf("[");
while (!empty(l)) {
printf("id cliente : %d id pagamento : %d importo : %.2f causale  : %s \n",head(l).idCliente,head(l).idPagamento,head(l).importo,head(l).causale );
l = tail(l);

} printf("]\n");
}
#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
#include "element.h"

list leggiPagamenti ( char *nomeFile )
{
element el ;
list lista = NULL;
FILE *f;
char car;
int count = 0;

        if ( ( f =  fopen  ( nomeFile , "r") ) == NULL  )
        {
            printf("Errore apertura file ");
            exit ( 1 );
        }

        while ( ( fscanf (f,"%d %d %f ",&el.idCliente,&el.idPagamento,&el.importo))> 0 )
        {
            while ( ( car = fgetc(f)) != '\n' && ( car != EOF ))
            {
                el.causale[count] = car;
                count++;
            }
            count = 0;
            lista = cons ( el, lista );


        }
        fclose ( f );
return lista;


}
pagamenti.c

#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
int main ( )
{
char nomeFile [] = "20130613";
list l = NULL;

l = leggiPagamenti(nomeFile);

showList ( l );
system("PAUSE");
}
#include "element.h"
#include "list.h"
#define NULL 0
/* OPERAZIONI PRIMITIVE */
list  emptylist(void)       /* costruttore lista vuota */
{ return NULL; }

boolean  empty(list l)  /* verifica se lista vuota */
{ return (l==NULL); }

list  cons(element e, list l)
{ list t;       /* costruttore che aggiunge in testa alla lista */
  t=(list)malloc(sizeof(item));
  t->value=e;
  t->next=l;
  return(t);
}

element  head(list l) /* selettore testa lista */
{ if (empty(l)) exit(-2);
  else return (l->value);
}

list  tail(list l)         /* selettore coda lista */
{ if (empty(l)) exit(-1);
  else return (l->next);
}


void showList(list l) {
// NON PRIMITIVE
printf("[");
while (!empty(l)) {
printf("id cliente : %d id pagamento : %d importo : %.2f causale  : %s \n",head(l).idCliente,head(l).idPagamento,head(l).importo,head(l).causale );
l = tail(l);

} printf("]\n");
}
#include <stdio.h>
#include <stdlib.h>
#include "pagamenti.h"
#include "element.h"

list leggiPagamenti ( char *nomeFile )
{
element el ;
list lista = NULL;
FILE *f;
char car;
int count = 0;

        if ( ( f =  fopen  ( nomeFile , "r") ) == NULL  )
        {
            printf("Errore apertura file ");
            exit ( 1 );
        }

        while ( ( fscanf (f,"%d %d %f ",&el.idCliente,&el.idPagamento,&el.importo))> 0 )
        {
            while ( ( car = fgetc(f)) != '\n' && ( car != EOF ))
            {
                el.causale[count] = car;
                count++;
            }
            count = 0;
            lista = cons ( el, lista );


        }
        fclose ( f );
return lista;


}
#包括
#包括
#包括“pagamenti.h”
#包括“element.h”
列表(char*nomeFile)
{
元素el;
list lista=NULL;
文件*f;
炭车;
整数计数=0;
if((f=fopen(nomeFile,“r”))==NULL)
{
printf(“错误开孔文件”);
出口(1);
}
而((fscanf(f,“%d%d%f”,&el.idCliente,&el.idpagato,&el.importo))>0)
{
而((car=fgetc(f))!='\n'&&(car!=EOF))
{
el.causale[计数]=汽车;
计数++;
}
计数=0;
lista=cons(el,lista);
}
fclose(f);
返回列表a;
}
好的,在VisualStudio上运行相同的代码,eclipse设置中的问题是否与此相关:什么操作触发了错误?对我来说:尝试在“变量”视图中探索变量值。