Mercurial > hg > Members > masakoha > testcode
view c/regexParser/main.cc @ 54:f540de861cd6
add Node struct
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Jun 2015 15:47:52 +0900 |
parents | 82fbc8478f7b |
children | 883e3473a9f5 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node { struct node *left; struct node *right; int type; int value; } Node, *NodePtr; NodePtr newNode(int type, int value, NodePtr left, NodePtr right) { NodePtr d = (NodePtr)malloc(sizeof(Node)); d->type = type; d->value = value; d->left = left; d->right = right; return d; } int main(int argc, char **argv) { for (int i = 1; i < argc ; i++) { } return 0; }