This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getting started help!


This works (on my Linux box)

[fwyzard@localhost test]$ cat test.cc
#include <iostream>
int main (void)
{
  std::cout << "It works!" << std::endl;
  return 0;
}

[fwyzard@localhost test]$ g++ test.cc -o test
[fwyzard@localhost test]$ ./test
It works!
[fwyzard@localhost test]$

Note: the changes I've made to your code are purely aesthetycal - a "\n" after the cout and an exit coe of 0 indicating success...



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]