what's wrong with this programe

M

Michael

#include<iostream>
#include<fstream>
using namespace std;
void main()
{
wchar_t str='hh';
wcout<<str;
}
 
P

Peter Koch Larsen

Michael said:
#include<iostream>
#include<fstream>
using namespace std;
void main() int main()
{
wchar_t str='hh'; wchar_t str=L"hh";
wcout<<str;
}

Peter
 
K

Kurt Watzka

Michael said:
#include<iostream>
#include<fstream>
using namespace std;

This need not be a good idea
void main()

This is wrong
{
wchar_t str='hh';

You probably want

wchar_t *string = L"hh";

or maybe

wchar_t character = L'h';

If you call it "str", you probably want the first of these two,
but who knows.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top