安装R Recommended软件包后,内核在使用Jupyter Notebook时显示错误

时间:2016-11-18 04:15:57

标签: r package jupyter-notebook jupyter-irkernel

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct{
  int itemid;
  char element[200]; //fixed array of chars to actually store a string
}mycollection;

void add_parent_node(char* parentnodename,int itemid,char* element){
  printf("Added node as follows\n");
  printf("Parent: %s\n",parentnodename);
  printf("Item ID: %d\n",itemid);
  printf("Element: %s\n\n",element);
}

int main(){
  char input[100]; //limit command to 99 characters
  mycollection ptemp[1];
  while(1){ //while(1) = endless loop
      printf("\nEnter command: ");
      scanf("%s", input);
      if (strcmp(input, "parent") == 0) {
      printf("\nId: ");
      scanf("%d", &ptemp->itemid);
      printf("\nElement:");
      scanf("%s", ptemp->element);
      add_parent_node("im_the_parent", ptemp->itemid, ptemp->element);
      }
      if (strcmp(input, "exit") == 0) {
      return 0; //return 0 = exit
      }
  }
}

0 个答案:

没有答案