I Declare input_events * ptr_ie as a private member in Mainwindow class and remove ptr_ie declarations from your get_info and print function.
But
Does not print all of the contents linked list
See
class input_events
{
typedef struct input ie;
public:
ie *l;
~input_events();
input_events();
void add_ie(ie *p);
void gener_ie();
friend class Trajectoire;
};
class input_events
{
typedef struct input ie;
public:
ie *l;
~input_events();
input_events();
void add_ie(ie *p);
void gener_ie();
friend class Trajectoire;
};
To copy to clipboard, switch view to plain text mode
And
{
Q_OBJECT
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
Ui::MainWindow *ui;
private slots:
void GetInfo();
void print();
private:
input_events * ptr_ie;
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
Ui::MainWindow *ui;
private slots:
void GetInfo();
void print();
private:
input_events * ptr_ie;
};
To copy to clipboard, switch view to plain text mode
^^^^^^^^^^^^^^^^^^^^^^^
See private
And this a function
void MainWindow::print()
{
//input_events * ptr_ie;
ie * ine;
for(ine=ptr_ie->l; ine; ine = ine->suiv)
{
ui->textBrowser->setText( ui->textBrowser->toPlainText() + resultString.setNum(ine->id) + " ");
}
}
void MainWindow::print()
{
//input_events * ptr_ie;
ie * ine;
for(ine=ptr_ie->l; ine; ine = ine->suiv)
{
QString resultString = "";
ui->textBrowser->setText( ui->textBrowser->toPlainText() + resultString.setNum(ine->id) + " ");
}
}
To copy to clipboard, switch view to plain text mode
The problem is that does not print ALL linked list
Bookmarks