Blogroll

widgets

Sabtu, 29 Oktober 2011

Coding C++

Beberapa Contoh Coding dari C++
#include <stdio.h>
#include <dir.h>
main(){
char *tmp;
tmp = searchpath("desktop.ini");
if(!tmp) perror("Gagal");
else printf("File path = %s\n",tmp);
return 0;
}
#include <dir.h>
#include <stdio.h>
main(){
char *dirname = "Data";
int result;
result = rmdir(dirname);
if(!result) printf("Folder %s berhasil dihapus",dirname);
else perror("Gagal");
return 0;
}
#include <stdio.h>
#include <dir.h>
main(){
int status;
char *dirname = "gaga";
status = mkdir(dirname);
if (!status)
printf("Folder %s telah dibuat\n",dirname);
else
{
printf("Folder %s gagal dibuat\n",dirname);
}

0 komentar:

Posting Komentar

Template by:

Free Blog Templates