Tags » C-2

Setting up Boost C++ Libraries for Large Integers in Code::Blocks on OS X

Having trouble getting integers larger than 64 bits to work in C++? So was I. Here’s how I fixed it:

  1. You’ll want to use the data type…
  2. 253 more words
Geekery

Quick Sort (p):

<br />#include<iostream>
#include<conio.h>
using namespace std;

int partition(int a[],int beg,int end)
{
int loc=beg,temp;
while(1)
{
while(a<=a && (loc!=end))
{
end=end-1;
}
if(loc==end)
return loc;
else if(a>a)
{
temp=a;
a=a;
a=temp;
loc=end;
}
while(a>=a && loc!=beg)
{
beg=beg+1;
}
if(loc==beg)
return loc;
else if(a<a)
{
temp=a;
a=a;
a=temp;
loc=beg;
}
}
}

void quick_sort(int a[],int beg,int end)
{
int loc;
if(beg<end)
{
loc=partition(a,beg,end);
quick_sort(a,beg,loc-1);
quick_sort(a,loc+1,end);
}
}

int main()
{
int a,n;
cout<<"Enter the size of array:"<<endl;
cin>>n;
cout<<endl<<"Enter elements here:"<<endl;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
quick_sort(a,0,n-1);
cout<<endl<<"After sorting array is:"<<endl;
for(int i=0;i<n;i++)
{
cout<<a[i]<<" ";
}
cout<<"\t\t@Myprogworld";
getch();
return 0;
}

… 18 more words
Sorting

pengulangan while

Pengulangan While

       Pengulangan(looping) adalah suatu pernyataan yang akan mengulangi instruksi di dalam block code selam waktu tertentu. waktu tertentu yang dimaksud adalah, selama kondisi pernyataan looping tersebut terpenuhi. 124 more words

C++

C++ Log - Entry #9

Okay, how long has it been since I have posted an entry on this blog? Two months? I forgot to check, and I can’t be arsed checking right now. 314 more words

C++

karakter istimewa dalam c++

Karakter Istimewa dalam C++

       karakter istimewa dalam c++pada bahasan sebelumnya tentang perintah input-output, anda telah melihat pada contoh kode program. Terdapat karakter “\n” misalnya “\n Hasil penjumlahan adalah : “. 91 more words

C++

C++ Templates Demo

Templates in C++ are kind of advanced topic, some might see them as complex to understand or maybe because their use isn’t clear that causes confusion. 565 more words

Tutorial

Asynchronous execution with C# "async" and "await" keywords

When you have to load some additional data while you are loading your main content. What would you do ?

Probably we can use threads and handle that kind of scenarios with asynchronous programming concepts… 123 more words

Async