[{"id":"1","capacity":"150","type":"conference","prix":"0","description":"description","image":""},{"id":"2","capacity":"200","type":"Formation","prix":"0","description":"desc"}]
如何在Android上获取此数组的值?
答案 0 :(得分:0)
试试这段代码:
#include <iostream>
using namespace std;
struct node {
int data;
node *next;
node(int data){
this->data = data;
}
};
class list {
node *head;
public:
void display();
};
void list::display() {
node *newnode = head = new node(2);
newnode = newnode->next = new node(2);
newnode = newnode->next = new node(1);
cout << newnode->data;
newnode = newnode->next = new node(2);
cout << " " << newnode->data;
newnode = newnode->next = new node(1);
newnode = newnode->next = new node(4);
cout << endl;
cout << newnode->data;
newnode->next = NULL;
}
int main() {
list ab;
ab.display();
}