At 09:24 2007-01-22, Rick wrote:
At 1/22/2007 01:34 AM, you wrote:
At 20:40 2007-01-21, Rick wrote:
At 1/21/2007 05:19 PM, you wrote:
At 12:27 2007-01-21, navid yaghoobi wrote:
Hi
if you want to work with linux its beter to work woth C
There is NO excuse for writing ANYTHING in C these days.......none!
I disagree. While it is good to form an opinion and have a
favorite language, that does not mean other languages are useless.
C is, and has been useless ever since C++ became standardized. and
I'll say it again, There is NO point in writing anything in C
these days. C++ is simply a better language, period
C is, in fact, a very good language. It is often used for writing
device drivers, for example. Sure, one could also use C++, but C
is a perfectly acceptable choice.
Victor. Have you opinion but don't degrade the choices of others.
It isn't necessary.
I wasn't degrading anyone, and it's NOT an opinion, it's fact
No, Victor, your statement is NOT fact. Saying "There is NO excuse
for writing ANYTHING in C these days.......none!" is simply not
true. Sure, C++ may be a superior language to C but, if one does not
know how to program C++ yet they do know how to write code in C,
then C is a perfectly acceptable choice.
This forum is supposed to help those of us who do not currently know
C++ and would like to learn. Statements/attitudes like yours make
that process more difficult.
One has to question WHY they know C and not C++. Absent thousands of
lines of code in C to be maintained, there is no excuse for using the language.
P.S. The program you wrote for me fails. I asked for a fix, but
received no reply.
then read your damned mail..... David gave the fix, and I replied to him
btw, sending a stupid .jpg file isn't the normal way to indicate a
failure.... there was NO text in the message, and I usually trash
EMails with no text and attached "pictures"
Victor,
Since you seem to be fixated on details, this is a message board,
not a mail system. Sure, I read David's comments on your code and
your reply to him. But the message was not directed to me and it was
not obvious that the <exception> -> <stdexcept> issue was supposed
to be the "fix" to your code I could not get to work.
I suspect you're the only person who didn't "get it" on David's fix.
That was a separate exchange between you and David. And, BTW, I
made that change. It now compiles without error, but it does not
run. Selecting "Run" (or double-clicking the program ICON) does
NOTHING. It does not even momentarily pop up a DOS command box.
Nothing. Nada. Zip.
I'm sorry, your IDE works differently than mine. The program is NOT
designed to be run by double clicking an ICON. It's a SHELL
program. So, you go the a command shell (DOS window to some folks,
though DOS is dead, thankefully, and has been for some time) and type
the name of yoru program followed by the words you want scored.
Also, I put the JPG there because "a picture is worth a thousand
words" and it showed exactly what the errors were. I'm sorry if
that's not standard practice here. Calling it "stupid" has no positive benefit.
And there WAS text in that message. Quite a bit of text which you
ignored. I cut it from the previous message and I'll paste it here.
Maybe you can comment on it now?
You added NOTHING to the text in your reply with the .jpg, just a
replay of my message and a picture at the bottom (which shows up as a
link in my mail program (Eudora) and the name of the file fo rthe
picture is a0a602c.jpg hardly something to indicate it might be
related to the situation at hand.
Keep in mind, please, that I have extensive experience with C but
none in C++. I'm on this board to, hopefully, learn the workings of
C++. This board (and others) are meant to help, not degrade, others.
It seems many of your posts DO ridicule people who seem "inferior"
to you. And, when it comes to C++ coding I'm sure we are. If you
want to be a hotshot, fine. But why not use your knowledge to help
others rather than tell them how stupid they are? That's why we are
here. To learn from those who know.
I want to learn. I don't think I post stupid questions. I never ask
for someone to write my code.
Here are my comments from the prior post (sans the JPG). Comment
nicely, if you will, please. I honestly would like to learn. I think
you have the knowledge to help.
NO such comments as follow were in the message.
"Errr, Thanks, I think. It's no wonder I stick with C and not C++.
learn, and write better safer code.
I thought C++ was supposed to make things easier!
it does
But there are WAY too many things hidden here.
NOTHING is hidden
[It's frustrating for a beginner.] Some examples:
for_each(argv+1, argv+argc, score_word);
How do I know what score_word will be given as arguments?
well, you COULD read the comments I put before score_word
What if score_word took more than a single argument?
it can't (as the general case) for_each is "designed" to call a
single arg function for each element in the range.
How would the for_each function know?
see above
What would it pass?
see above
(Is for_each an internal, standard class?)
1st one presumes that you've actually read something about the
language. We have a list of books we recommend the 2nd one on the
list the ONLY "must have" covers this like a blanket. The list can
be found at http://rudbek.com/books.html
and no, for_each is not internal nor a class.
it is found in the standard header <algorithm> and it's an algorithm.
catch (not_a_letter& e)
{
/// output whatever error message decided at the
point the error was found
cout << e.what() << '\n';
}
Again. WHAT!? not_a_letter is defined as a structure.
not_a_letter IS a struct. Here it is used as a type to tell the
compiler what e is (well the & tells it's a reference to the struct)
The "catch" uses it with an argument e?
yes, catch (part of try/catch) takes an argument. The type of thing thrown.
and then cout uses the argument e. How am I supposed to know that
the argument e has a method what()? This is VERY confusing!
It's part of inheritance.... std::runtime_error has a what()
method, since not_a_letter publicly inherits from std::runtime_error
it also has a what()
Until I have the time to learn all the hidden classes, etc. I'll stick to C.
IMO, you're a fool to "stick with C" because you can't make the
effort to learn something new.
Thanks for the example, though.
DevC++ shows the folllowing errors. It even complains about struct
not_a_letter not having a member what, as I questioned...
I dug out my CevC++ (4.9.9.0) and it compiles just fine, and I can
run the .exe file... here's a copy/paste from the command window:
C:\Dev-Cpp>dir rick*
Volume in drive C is VideoStorage
Volume Serial Number is 9424-5F8B
Directory of C:\Dev-Cpp
2007-01-21 14:58 3,300 Rick.cpp
2007-01-21 14:48 846 Rick.dev
2007-01-21 14:58 571,627 Rick.exe
2007-01-21 14:58 144,864 Rick.o
4 File(s) 720,637 bytes
0 Dir(s) 11,814,576,128 bytes free
C:\Dev-Cpp>Rick
Usage: Rick word[ word]...
C:\Dev-Cpp>Rick Now is the time for all good men to come to the aid
of their party.
Now: we don't allow uppercase letters in this program.
is: 109
the: 213
time: 254
for: 156
all: 61
good: 131
men: 95
to: 260
come: 108
to: 260
the: 213
aid: 14
of: 66
their: 312
party.: we don't allow punctuation in this program.
C:\Dev-Cpp>
"
~Rick
not C++ or vc
as replied to bevore, vc is NOT a language
but java is verey powerfull it's beter to study java it's a very
goof language especially J2EE
ed <[EMAIL PROTECTED]> wrote:
On Sat, 20 Jan 2007 20:44:06 -0800 (PST)
Bilal Jan <<mailto:just4u_cpp%40yahoo.com>[EMAIL PROTECTED]> wrote:
> hello everyone
> i am a student of comp engg and i have to choose one language JAVA
> or VC++ in my next term elective cource. i have heard that VC++ is
> more verstile and is also in now a dayz where as Java has not much
> applications area. can u plz guide me wh language is better . regards
> ahmed bilal
perl
--
Regards, Ed :: <http://www.openbsdhacker.com>http://www.openbsdhacker.com
just another linux hacker
Chuck Norris is always loaded. Chuck Norris does not point himself at
anything he is not willing to destroy.
<http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/>Never
miss an email again!
Yahoo! Toolbar alerts you the instant new Mail
arrives.<http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/>
Check it out.
Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"
Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"
Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"