r/CompileBot • • Jan 04 '14

Official CompileBot Testing Thread

This thread is archived, please visit the new testing thread

14 Upvotes

421 comments sorted by

View all comments

1

u/Mrblahblah200 Mar 23 '14

+/u/CompileBot C++

#include <stdio.h>
int main(int argc, const char* argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("%s", argv[i]);
  }
}

Input:

0

1

2

3

4

5

6

1

u/Mrblahblah200 Mar 24 '14

+/u/CompileBot C++11

#include <stdio.h>
int main(int argc, const char* argv[], const char* env[]) {
  for (int i = 0; env[i] != nullptr; i++) {
    printf("%s", env[i]);
  }
}

1

u/CompileBot Mar 24 '14

Output:

TMPDIR=/tmp/TlxmXYPATH=/usr/local/bin:/usr/bin:/binPWD=/home/9jW3g9LANG=en_US.UTF-8HOME=/home/9jW3g9SHLVL=0

^source | ^info | ^git | ^report