simple command

Sysprogs forums Forums VisualGDB simple command

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8359
    MoriJim
    Participant

    Hello,

    I’d like to know if it’s possible to simply write a command like “sudo apt-get upgrade” in the visual studio inteface and then happen on my raspberry pi?

    I know it’s possible to do it after debug but there is a way to do it like a step/line in C ++ code ? like    ===> Make_this_cmd_on_rasp(“sudo apt-get upgrade”)

    Thanks a lot for the anwers.

    Have a good day.

    MoriJim

    #8360
    support
    Keymaster

    Hi,

    You can use the system() function:

    #include <stdlib.h>
    int main()
    {
        system("sudo apt-get upgrade");
        return 0;
    }

    Let us know if this works.

    #8362
    MoriJim
    Participant

    no, he does not :/.

    #8370
    support
    Keymaster

    Hi,

    OK, please let us know what errors you are encountering so that we could help you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.