View Code of Problem 1

#include <iostream>

using namespace std;

int main(int argc, char* argv[], char** env){
  char** lines = env;
  while(*line!=nullptr){
    cout << *line <<endl;
  }
  return 0
}
/*
Main.cc: In function 'int main(int, char**, char**)':
Main.cc:7:10: error: 'line' was not declared in this scope
   while(*line!=nullptr){
          ^
Main.cc:11:1: error: expected ';' before '}' token
 }
 ^
Main.cc:6:10: warning: unused variable 'lines' [-Wunused-variable]
   char** lines = env;
          ^
*/

Double click to view unformatted code.


Back to problem 1