Skip to content

Latest commit

History

History
69 lines (58 loc) 路 2.4 KB

File metadata and controls

69 lines (58 loc) 路 2.4 KB

BELAJAR C++

di repositories ini saya belajar mengenal c++ lebih dekat, dari membuat perhitungan sederhana sampai perhitungan tingkat lanjut (semoga).

Install C++ Windows

  1. Install Visual Studio Code: Download and install VS Code from the official website
  2. Install the C/C++ Extension:
    1. Open VS Code.
    2. Go to the Extensions view (Ctrl+Shift+X).
    3. Search for "C++" and install the Microsoft C/C++ extension.
  3. Install MinGW-w64 (GCC Compiler):
    1. Download and install MSYS2 from the MSYS2 website.
    2. Follow the instructions to update packages and install the GCC compiler using the pacman command within the MSYS2 terminal (the specific commands are detailed in the freeCodeCamp guide).
  4. Add to PATH: Add the path to the MinGW bin folder (e.g., C:\msys64\ucrt64\bin) to your Windows environment variables so VS Code can find the compiler.
  5. Configure VS Code: Follow the official VS Code documentation to configure your project to use the MinGW compiler.

Run Program

membuat kompilasi

g++ nama_file -o nama_file_di_kompilasi

jalankan file kompilasi

./nama_file_di_kompilasi

atau bisa membaca official VS Code documentation

馃搧 Absensi Mahasiswa

Sistem ini menggunakan penyimpanan file eksternal untuk menyimpan data akun dan log kehadiran.

// Menghasilkan timestamp otomatis untuk setiap absen
string ambilWaktu() {
    time_t now = time(0);
    char* dt = ctime(&now);
    string waktu = dt;
    waktu.pop_back(); 
    return waktu;
}

setelah berhasil buat akun atau berhasil absen akan ada 2 file yaitu data_absensi.txt dan log_absensi.txt yang dibuat otomatis untuk menyimpan log absen dan data login.

馃搧 Konverter Mata Uang (IDR)

Mata uang yang bisa dikonversi

IDR(16604) ke USD(1)
IDR(19303) ke EUR(1)
IDR(106) ke JPY(1)

selebihnya menyusul hehe..

馃搧 Pengolahan Nilai

malasss