hi!

¹

¹Ú¼Ò¿µ

Hi!
everyone
My name is melanie.
Whats the difference between print and cott?
Please answer me .

thank.
 
A

Alf P. Steinbach

Hi!
everyone
My name is melanie.
Whats the difference between print and cott?
Please answer me .

Melanie, you have posted to a discussion group concerned only with
programming in the language C++.

This reply is crossposted to [news.newusers.questions], where it may
happen that someone knows about the difference between print and cott,
or at least can direct you further.

If you reply to this posting, the reply will be posted in the
[news.newusers.questions] group, unless you actively change that.

Hth.
 
A

Attila Feher

¹Ú¼Ò¿µ said:
Hi!
everyone
My name is melanie.
Whats the difference between print and cott?

I have no idea. C++ has neither print nor cott as far as I know.
 
M

Mike Wahler

¹Ú¼Ò¿µ said:
Hi!
everyone
My name is melanie.
Whats the difference between print and cott?

#include <iostream>
#include <numeric>
#include <string>

int main()
{
std::string print("print");
std::string cott("cott");

std::cout << "The difference between "
<< print << " and " << cott << " is "
<< std::accumulate(print.begin(), print.end(), 0) -
std::accumulate(cott.begin(), cott.end(), 0)
<< '\n';

return 0;
}

The difference on my machine is 115.
It may be different on your system.

-Mike
 
N

Noah Roberts

Attila said:
I have no idea. C++ has neither print nor cott as far as I know.

What I find strange is that in minutes after this person sent a message,
4 more followed that also had garbage text. 3 of which come from the
same host yet all from different user addresses. A 5th (and 4th)
actually is stamped before this one. This person either is a sleazoid,
has a virus, uses a server with a virus, has a most disreputable ISP, or
a coincidence of rather astronomical odds has taken place.

NR
 
K

Kevin Goodsell

Noah said:
What I find strange is that in minutes after this person sent a message,
4 more followed that also had garbage text. 3 of which come from the
same host yet all from different user addresses. A 5th (and 4th)
actually is stamped before this one. This person either is a sleazoid,
has a virus, uses a server with a virus, has a most disreputable ISP, or
a coincidence of rather astronomical odds has taken place.

I think this person is having trouble setting up her(?) news client, and
thought comp.lang.c++ would be a good place to test (melanie: It's NOT.
Use alt.test or one of the other testing groups).

-Kevin
 
N

Noah Roberts

Alf said:
Hi!
everyone
My name is melanie.
Whats the difference between print and cott?
Please answer me .


Melanie, you have posted to a discussion group concerned only with
programming in the language C++.

This reply is crossposted to [news.newusers.questions], where it may
happen that someone knows about the difference between print and cott,
or at least can direct you further.

I think it pretty safe to gather that the OP wants to know the
difference between cout and printf and happens to be less than
proficient at typing and/or speaking english; they obviously do not
reside in an english speaking country and probably use korean natively,
which uses a completely different keyboard mapping and grammatical
structure. IMHO it is pretty heavy handed to attempt changing the
destination of the thread by cross-posting and altering the follow-up
(which I have fixed but I almost posted to the wrong group, thanks).
Making an effort to post in the groups language when it is not your own
is not something we should be discouraging by being rude and rediqulous
(sp?); and for that matter they didn't do THAT bad....multi-posting aside.

To answer this question simply, one is the "C" way and one the "C++"
way. In C++ you can use either but cout is safer and more readable in
many cases. printf has no type safety at all and the format string is
not easily learned. cout on the other hand is more strongly typed and
does not require the use of convoluted format strings.

NR
 
N

Noah Roberts

Kevin said:
I think this person is having trouble setting up her(?) news client, and
thought comp.lang.c++ would be a good place to test (melanie: It's NOT.
Use alt.test or one of the other testing groups).

Could very well be. The message seems authentic. The many different
user addresses is strange though. My reader can't display korean, and I
wouldn't be able to read it if it did, so I can't tell what these other
messages are about to know if they have the same subject matter.

NR
 
A

Attila Feher

Noah said:
Could very well be. The message seems authentic. The many different
user addresses is strange though. My reader can't display korean,
and I wouldn't be able to read it if it did, so I can't tell what
these other messages are about to know if they have the same subject
matter.

I have notified the ISP that their user has trouble.
 
A

Attila Feher

Mike Wahler wrote:
[SNIP]
The difference on my machine is 115.
It may be different on your system.

Mike, you get 10 out of 10 points from me for this. And another bonus 10.
:)
 
G

Gary Labowitz

Could very well be. The message seems authentic. The many different
user addresses is strange though. My reader can't display korean, and I
wouldn't be able to read it if it did, so I can't tell what these other
messages are about to know if they have the same subject matter.

I check the message in Korean. Loosely translated it read:
Why cannot one use void main( )? My standard Korean compiler accepts
it.
[Just kidding!]
 
M

Mike Wahler

Attila Feher said:
Mike Wahler wrote:
[SNIP]
The difference on my machine is 115.
It may be different on your system.

Mike, you get 10 out of 10 points from me for this. And another bonus 10.
:)

I thought if I was able to make you smile, you
and I might not disagree so much. :)

-Mike
 
A

Attila Feher

Gary Labowitz wrote:
[SNIP]
I check the message in Korean. Loosely translated it read:
Why cannot one use void main( )? My standard Korean compiler
accepts it.
[Just kidding!]

Korean compilers are allowed to do it by TC1.271, but only if with
the --the-sage-is-a-silly-troll command line argument.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Hi! 0
Hi From Canada 3
Hi! 0
Hi 1
Hi Everyone! 2
Hi! 0
Hi everyone, I need advice from a developer with experience in team projects, please help me 3
Hi and hello! 0

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top