Friday, September 14, 2007

Re: [BLUG] C/C++

Thanks--I'll give this a try next week.

It's NOT an irrational fear of the command line--I'd just like to make
that clear. My fear is of command line text editors. So, it's a very
specific irrational fear. More akin to a dog who flips out when the
fridge kicks on, but who is unbothered by the vacuum cleaner and the
washer and dryer and dishwasher. As opposed to a dog with a fear of
strange noises...

Ana (who is still trying to figure out how to be in Dayton, Ohio at
7:00 am, without having to just STAY up until 3:00 am, then loading up
the collie and the cooler and leaving...)

On 9/14/07, Gillis, Chad <rcgillis@indiana.edu> wrote:
>
>
> Quoting Pawsitive Results <pawsitiveresults@gmail.com>:
>
> >
> > And, for over a year now, I've suspected that, sooner or later, my
> > irrational fear of command line text editors was going to bite me in
> > the butt. It appears I was right.
> >
>
> Hi Ana,
>
> If you have an irrational fear of the command line then try an example
> to get you started.
>
> Open up a command line terminal somewhere.
>
> At the terminal type:
>
> "ls learningCpp" <enter>
>
> If it says "No such file or directory" then type
>
> "mkdir learningCpp" <enter>
>
> (otherwise choose a different directory name)
>
> Follow this by
>
> "cd learningCpp" <enter>
>
> then
>
> "emacs example.cpp" <enter>
>
> An emacs window should open.
>
> Then cut and paste the following into the emacs window
>
> /////////START HERE////////////
> #include <iostream>
> using namespace std;
>
> int main(){
>
> for(int i=0;i<10;i++){
> cout << "hello!!! " << i << endl;
> }
>
> return 0;
>
> }
> //////////END HERE//////////////
>
> In the emacs window hold down the control key. While holding down the
> control key type x then type s. That will save the file. Now go back
> to the terminal.
>
> In the terminal type
>
> "g++ example.cpp -o example" <enter>
>
> followed by
>
> "./example" <enter>.
>
> Assuming I haven't left anything out, then that will have edited the
> program example.cpp, compiled it and then run it.
>
> I'm just using emacs as an example since that's what my own limited
> experience has provided me with.
>
> Hope that helps.
>
> Chad
>
>
>
>
>
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: