Welcome to the Linux Foundation Forum!

WIFI connection

Hello, I need a piece of code that connects to the WIFI network when the user requests. Please send the code in C or C++. Thank you! GCS

Comments

  • Connecting to a WiFi network with C++ is kind of like trying to fix a car with a hammer. You can try all you want but it’s not the right tool for the job. I’m sure there is probably a way to do it with the Windows or POSIX APIs, but it’d be far easier to write a batch\shell script and invoke that script within a program.

    If you’re talking specifically about using the internet for something in an application, odds are you’re going to be using a database connector (SQL, MySQL, Mongo, etc) or a c++ cURL library.

  • divya165
    divya165 Posts: 3

    @carlsmith said:
    Connecting to a WiFi network with C++ is kind of like trying to fix a car with a hammer. You can try all you want but it’s not the right tool for the job. I’m sure there is probably a way to do it with the Windows or POSIX APIs, but it’d be far easier to write a batch\shell script and invoke that script within a program.

    If you’re talking specifically about using the internet for something in an application, odds are you’re going to be using a database connector (SQL, MySQL, Mongo, etc) or a c++ cURL library.

    Thanks for the answer, It will be helpful for me.

Categories

Upcoming Training