__int64

Started by
5 comments, last by sop3k 22 years, 1 month ago
Hello!!! How can I print on the screen the __int 64 variable because the code like that: #include......... __int64 variable; int main() { varaible=987654321987; cout<>varaible; } but this dosen''t work.Why???? Thanx for answer and sorry for my Ugly english!!!!!!! Sopek
Advertisement
sorry for this seccond post.
in the last post I was made a mistake. In the code should be:
__int64 v;
main()
{
v=658564564573;
cout<}
F..k what happened!!!??? I was wrote that "cout<Sory!!!
You have to write your own stream operators to work with int64''s.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Or you can use printf -

printf("%I64d",variable);

or upgrade to MSVC++.NET.
quote:Original post by sopek
F..k what happened!!!??? I was wrote that "cout<Sory!!!


Yet another good reason to usewhitespacetoenhancereadability.
cout << v; The board doesn''t interpret this as an opening HTML tag. 


[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Use VS.NET, whose libraries have suitable overloads, or write overloads for the libraries you''re using at the moment.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/

This topic is closed to new replies.

Advertisement