topical media & game development

talk show tell print

professional-program-01-hellovariables-hellovariables.c

? / professional-program-01-hellovariables-hellovariables.c


  // hellovariables.cpp
  //
  // NOTE: Some C++ environments may report a runtime error
  // when the uninitialized variable is accessed.
  
  include <iostream>
  
  using namespace std;
  
  int main(int argc, char** argv)
  {
    int uninitializedInt;
    int initializedInt = 7;
  
    cout << uninitializedInt << " is a random value" << endl;
    cout << initializedInt << " was assigned an initial value" << endl;
  
    return 0;
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.