Open workspace issue


#1

hello,

I did something wrong in terminal after I compiled c coding.

I forced close the project then tried to re-open, it won’t work.

here is the URL:

https://c9.io/john2675/helloworld

I need the “hello.c” inside the project.

Please help me out!


#2

I can access the workspace just fine, here is hello.c:

#include <stdio.h>
#include <string.h>
#include<stdlib.h>
int main( int argc, char* argv[]){
    
  //char ch;
  unsigned long charcount = 0, wordcount = 0, linecount = 0;
  int flag,length;
  char str[100];
  char ch;
  /*
  printf("%d \n",argc);
  printf("%s\n", argv[0]);
  printf("%s\n", argv[1]);
  printf("%s\n", argv[2]);
  */
  while((ch = getchar()) != EOF){
    if (ch == '\n')
      linecount++;
  }
  
  system("./a.out < b.txt");
  
  while(scanf("%99s",str) != EOF){
    length = strlen(str);
    if(length == 1){
      charcount++;
    }
    else if (length > 1){
      charcount += length;
      flag = 1;
      //check apostrophe 
      for(int i = 0; i < length;i++){
        if (str[i] == '\''){
          wordcount += 2;
          flag = 0;
          break;
        }
      }
      if (flag){
        wordcount++;
        //linecount++;
      }
    }
    
    
    //printf("%s\n", str);
    //printf("%c", ch);


  }

    printf( "char:%lu word:%lu line:%lu\n", charcount, wordcount, linecount );
    return 0;
}

If the problem persists, try sending your workspace URL to support@c9.io with a request to restart it. Be aware that their support email is for premium users only, but if you need your workspace restarted they will do it for you.