Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.
/ salib Public archive

salib (smarter argument library) is a single-file library to handle arguments in C++ | made as a successor to ecah-lib

License

Notifications You must be signed in to change notification settings

jstmaxlol/salib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

salib ๐Ÿ’‰

salib (smarter argument library)
is a single-file library to handle arguments in C++11 | made as a successor to ecah-lib

how to use โ‰๏ธ

to use salib you need to download the library's .h (header) file and #include it in your C++ project
if the header file is in the same directory as your .cpp file #include "salib.h" here's an example snippet;

#include <iostream>
#include <string>
///
// // example | salib
///

#include "salib.h"                                          // include salib

int main(int argc, char** argv) {
    sa.retrieve(argc, argv);                                // retrieve argc & argv

    std::string bufferString;                               // create a buffer std::string for the first argument
    sa.get(bufferString, 1);                                // store the first argument in the buffer std::string

    std::cout << "argc=" << argc << "\n"                    // output argc
              << "argv[1]=\"" << bufferString << "\"\n";    // output the first argument through the buffer std::string
    return 0;
}

About

salib (smarter argument library) is a single-file library to handle arguments in C++ | made as a successor to ecah-lib

Topics

Resources

License

Stars

Watchers

Forks

Languages