By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

cout << ""

P: n/a
Hi

I am playing around with visual studio 7.0.
Why does the code below do like it does?
Where do I set the character set to use in cout,
properties->configuration properties->General->character does not do
the trick.

#include <iostream>
using namespace std;
int main()
{
cout << "";
}

output:
σΣ

expected output:

thanks!
Jul 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"karolina" <ra********@hotmail.com> wrote in message
news:c8*************************@posting.google.co m...
Hi

I am playing around with visual studio 7.0.
Why does the code below do like it does?
Where do I set the character set to use in cout,
properties->configuration properties->General->character does not do
the trick.

#include <iostream>
using namespace std;
int main()
{
cout << "";
}

output:
σΣ

expected output:



[OT]
In windows open up a dos prompt window and type :
mode con
You should get information which tells you the DOS code page. (mine's is
850)

In the file menu within VC++ find the Advanced save options.
Save your file as ( in my case). Western European DOS - codepage 850 .
Your codepage should be listed there too if it is different from mine.

This should give you the expected output.

Additionally oven up character map in windows and select the check box for
advanced view , change the character set to the same as your DOS is using
and you will see what characters are compatable..

HTH
Jul 22 '05 #2

P: n/a
On 4 Dec 2003 14:10:56 -0800, ra********@hotmail.com (karolina) wrote
in comp.lang.c++:
Hi

I am playing around with visual studio 7.0.
Why does the code below do like it does?
Where do I set the character set to use in cout,
properties->configuration properties->General->character does not do
the trick.

#include <iostream>
using namespace std;
int main()
{
cout << "";
}

output:
σΣ

expected output:

thanks!


news:microsoft.public.vc.*. This is not a C++ language issue.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 22 '05 #3

P: n/a
ra********@hotmail.com (karolina) wrote in message news:<c8*************************@posting.google.c om>...
Hi

I am playing around with visual studio 7.0.
Why does the code below do like it does?
Where do I set the character set to use in cout,
properties->configuration properties->General->character does not do
the trick.

#include <iostream>
using namespace std;
int main()
{
cout << "";
}

output:
σΣ

expected output:

thanks!


I expect you're swedish, so I'll write in swedish. ;)

Du mste skriva dessa tecken med ascii-kod, s att istllet fr att
skriva

cout<<"Jag r p en ";

s skriver du

cout<<"Jag \x84r p\x86 en \x94";

= \x86
= \x84
= \x94

frstr du?
om inte fr du maila.
la********@hotmail.com
Jul 22 '05 #4

P: n/a
"Lars T?rnqvist" <la********@hotmail.com> wrote...
ra********@hotmail.com (karolina) wrote in message

news:<c8*************************@posting.google.c om>...
Hi
[...]
thanks!


I expect you're swedish, so I'll write in swedish. ;)
[...]


Please consider that the majority of readers in this newsgroup
are not Swedish, and out of them, most cannot read Swedish. If
your answer could be of any interest to them, the form in which
it was presented made it impossible to use.

If you think that your answer is NOT interesting to the rest of
the newsgroup readers, use private e-mail, please. Otherwise,
perhaps next time you will be so kind as to supply an English
translation of what you have to say.

Thank you very much.

Victor

Jul 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.