WFandella
Tuesday, June 4, 2013
Contoh Program Exception Handling C++ (2)
#include<iostream>
using namespace std;
template<class T>void LEMPAR(T X){
try{
if(X){
throw X;
}
}
catch(...){
cout<<"Program menemukan sebuah kesalahan"<<endl;
}
}
//Fungsi Utama
int main(){
LEMPAR(200);
LEMPAR(13.3);
LEMPAR('C');
LEMPAR("Mengungkap Rahasia C++");
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Link
Contoh Program Menu Gabungan antara Queue & Sorting C++ (Struktur Data)
Mencari Nilai Terkecil Array (C++)
#include<stdio.h> #include<conio.h> int main(void){ int nilai[3];
Contoh Program Linked List insert Kanan (Struktur Data)
#include<stdio.h> #include<stdlib.h> #include<conio.h> void BUAT_SIMPUL(int X); void AWAL(); void CETAK(); void Ins...
No comments:
Post a Comment