I was hoping to build a program that needs access to battery percentage and to know weather its plugged in (charging) or not, im new to C and have only coded using the command line, is there any library that has this system or information, or would i need to learn another language?
i tried the following code but had no luck:
if (strcmp("BatteryLevel", commandArgv[0]) == 0) {
printf("The battery level is ",);
return 1;
}
And if its possible where or how can i learn these things, as i couldn't find books that offer learning between basic c programming and professional programming?