Friday, September 14, 2007

Re: [BLUG] C/C++

But if you want to tackle a phobia of command-line text editors, then
there'd be no way of completely destroying it and putting it to rest
like figuring out vi. I've gone through the tutorials that Mark talked
about on Tuesday, vimtutor and vilearn. They're actually really well
laid out. Of course depending on whether you have time and whether
it's a priority for you, you could give them a shot. Emacs also has a
really good tutorial which is available in the help menu or by
control-h t.

Quoting Pawsitive Results <pawsitiveresults@gmail.com>:

> 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
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: