When I use _int64 in C language, I used below.
[c]
_int64 x;
printf("%I64d", x );
[/c]
But I want to use _int64 with iostream. When I wrote this code,
[cpp]
cout << x;
[/cpp]
Visual C compiler say " Error : 'operator <<' is ambiguous ".
What is wrong? How can I use cin or cout with _int64 data type?
I read MSDN and other references, But I can't find the solution.
Please help me.
[/cpp]
Using _int64 datatype with iostream ( cin, cout )
Moderator: Board moderators
-
- New poster
- Posts: 22
- Joined: Sun Oct 20, 2002 6:41 pm
- Location: Lithuania
- Contact:
-
- New poster
- Posts: 22
- Joined: Sun Oct 20, 2002 6:41 pm
- Location: Lithuania
- Contact:
If I remember correctly, long long is not ISO c++ type (though it is already present in C99 standard). However, many compilers (g++ being one of them) support long long (as well as libraries like iostream do). I'm sure that judge is not using --strict compiler option (which enforces strict ISO compatibility) as some code I have succesfully submited contained operations with long long types (though I have used printf/scanf family for IO)