Hello, i was finishing my project..
this my first project in c++, i use visual c++. my application used to ping many ip destination, i use many process to this aplication if we ping many ip destination. here is..
if u need application dowload here
if u need source dowload here
place all application in folder C:\Pingtest, create manula Pingtest folder
Tampilkan postingan dengan label Tutorial C. Tampilkan semua postingan
Tampilkan postingan dengan label Tutorial C. Tampilkan semua postingan
Selasa, 17 Desember 2013
Selasa, 13 November 2012
Belajar C melalui linux
Sekarang saya sedang mencoba belajar bahasa c linux dan seperti biasa saya mencari tutorial-tutorialnya.
dan berikut ini tutorialnya:
tutorial1
tutorial2
tutorial3
dan berikut ini tutorialnya:
tutorial1
tutorial2
tutorial3
Label:
Bahasa C/C++
,
belajar linux bahasa c
,
belajar melalui linux
,
C/C++
,
IT
,
Tutorial C
,
Tutorial C/C++
Minggu, 11 November 2012
Preprocessor C++
Preprocessor berjalan sebelum kompilasi dimulai. Hasil dari preprocessing adalah file tunggal yang kemudian diteruskan ke compiler yang sebenarnya. Penulisanya di mulai denngan karakter #, dan intruksi-intruksinya meliputi define, undef, include, if, ifdef, ifndef, else, elif, endif, line, error, warning, pragma.
Conditional inclusion
Syntax
#if expression
#ifdef expression
#ifndef expression
#elif expression
#else expression
#endif expression
contoh:
#define ABCD 2
#include
int main()
{
#ifdef ABCD
std::cout << "1: yes\n";
#else
std::cout << "1: no\n";
#endif
#ifndef ABCD
std::cout << "2: no1\n";
#elif ABCD == 2
std::cout << "2: yes\n";
#else
std::cout << "2: no2\n";
#endif
#if !defined(DCBA) && (ABCD < 2*4-3)
std::cout << "3: yes\n";
#endif
}
Output:
1: yes
2: yes
3: yes
Replacing text macros
Syntaxbr> #define identifier replacement-list
#define identifier( parameters ) replacement-list
#define identifier( parameters, ... ) replacement-list
#define identifier( ... ) replacement-list
#undef identifier
Contoh
#include
//make function factory and use it
#define FUNCTION(name, a) int fun_##name() { return a;}
FUNCTION(abcd, 12);
FUNCTION(fff, 2);
FUNCTION(kkk, 23);
#undef FUNCTION
#define FUNCTION 34
#define OUTPUT(a) std::cout << #a << '\n'
int main()
{
std::cout << "abcd: " << fun_abcd() << '\n';
std::cout << "fff: " << fun_fff() << '\n';
std::cout << "kkk: " << fun_kkk() << '\n';
std::cout << FUNCTION << '\n'; OUTPUT(million);
}
Output:
abcd: 12
fff: 2
kkk: 23
34
million
Warning directive
Syntax
#warning warning_message
untuk Meberitahukan peringatan sebelum di compile
Error directive
Syntax
#error error_message
Untuk memberitahukan bahwa program yang kita buat ternyata bermasalah.
Sumber
Sekian Terima kasih
Conditional inclusion
Syntax
#if expression
#ifdef expression
#ifndef expression
#elif expression
#else expression
#endif expression
contoh:
#define ABCD 2
#include
int main()
{
#ifdef ABCD
std::cout << "1: yes\n";
#else
std::cout << "1: no\n";
#endif
#ifndef ABCD
std::cout << "2: no1\n";
#elif ABCD == 2
std::cout << "2: yes\n";
#else
std::cout << "2: no2\n";
#endif
#if !defined(DCBA) && (ABCD < 2*4-3)
std::cout << "3: yes\n";
#endif
}
Output:
1: yes
2: yes
3: yes
Replacing text macros
Syntaxbr> #define identifier replacement-list
#define identifier( parameters ) replacement-list
#define identifier( parameters, ... ) replacement-list
#define identifier( ... ) replacement-list
#undef identifier
Contoh
#include
//make function factory and use it
#define FUNCTION(name, a) int fun_##name() { return a;}
FUNCTION(abcd, 12);
FUNCTION(fff, 2);
FUNCTION(kkk, 23);
#undef FUNCTION
#define FUNCTION 34
#define OUTPUT(a) std::cout << #a << '\n'
int main()
{
std::cout << "abcd: " << fun_abcd() << '\n';
std::cout << "fff: " << fun_fff() << '\n';
std::cout << "kkk: " << fun_kkk() << '\n';
std::cout << FUNCTION << '\n'; OUTPUT(million);
}
Output:
abcd: 12
fff: 2
kkk: 23
34
million
Warning directive
Syntax
#warning warning_message
untuk Meberitahukan peringatan sebelum di compile
Error directive
Syntax
#error error_message
Untuk memberitahukan bahwa program yang kita buat ternyata bermasalah.
Sumber
Sekian Terima kasih
Label:
Bahasa C/C++
,
C/C++
,
IT
,
panduan C/C++
,
preprocessor C
,
preprocessor C++
,
Tutorial C
,
Tutorial C/C++
Langganan:
Postingan
(
Atom
)

