fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. std::istream &ignore_lines(std::istream &is, std::string const &s) {
  6. std::string current;
  7.  
  8. while (std::getline(is, current) && current != s)
  9. ;
  10. return is;
  11. }
  12.  
  13. int main() {
  14. ignore_lines(std::cin, " --");
  15.  
  16. std::string line;
  17. while (std::getline(std::cin, line)) {
  18. std::istringstream buffer(line);
  19. std::string tmp;
  20. buffer >> tmp;
  21. std::getline(buffer, tmp);
  22. std::cout << tmp << "\n";
  23. }
  24. }
Success #stdin #stdout 0s 3024KB
stdin
ffmpeg version N-49352-gc46943e Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 26 2013 12:06:49 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --en
able-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable
-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.100 / 52. 17.100
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 34.101 /  3. 34.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
File formats:
 D. = Demuxing supported
 .E = Muxing supported
 --
  E 3g2             3GP2 (3GPP2 file format)
  E 3gp             3GP (3GPP file format)
 D  4xm             4X Technologies
  E a64             a64 - video for Commodore 64
 D  aac             raw ADTS AAC (Advanced Audio Coding)
stdout
 3g2             3GP2 (3GPP2 file format)
 3gp             3GP (3GPP file format)
  4xm             4X Technologies
 a64             a64 - video for Commodore 64
  aac             raw ADTS AAC (Advanced Audio Coding)