Cuando pulsamos un botón se ejecuta la función kill con el pid indicado y la señal que corresponde al botón
void MainWindow::on_boton_SIGTERM_clicked()
{
kill(ui->lineEdit_PID->text().toInt(),SIGTERM);
}
Puedes descargar el proyecto desde aqui
void MainWindow::on_boton_SIGTERM_clicked()
{
kill(ui->lineEdit_PID->text().toInt(),SIGTERM);
}
Puedes descargar el proyecto desde aqui
#include <graphics.h> int main( ) {
// Inicia un cuadro de 400x300 caracteres initwindow(400, 400, "Ejemplo Matriz");
int n=10; // Cantidad de columnas de la matriz int m=10; // Cantidad de filas de la matriz char matriz[n][m];
memset((void*)matriz,48,sizeof(char)*m*n); // Limpa la zona de memoria char caracter_puntual[2]={0,'\n'}; // Caracter específico de la matriz for (int x=0; x < n ; ++x ) {
// Imprime la columna
for (int y=0; y < m ; ++y )
{
caracter_puntual[0]=matriz[x][y];
// Imprime el valor x,y de la matriz
outtextxy(x*20,y*20,caracter_puntual);
}
delay(200);
}
getchar();
return 0;
}
#include <winbgim.h> void waitForLeftMouseClick(); int main() { initwindow(700,300); settextstyle(0,0,2); setcolor(RED); outtextxy(100,100,"WELCOME TO CÓDIGO INFORMÁTICO"); setcolor(GREEN); outtextxy(280,130,"INFO - UNT"); // while(!kbhit()); // wait for user to press a key waitForLeftMouseClick(); closegraph(); //close graphics window return 0; } void waitForLeftMouseClick() { clearmouseclick(WM_LBUTTONDOWN); const int DELAY = 50; int x, y; while (!ismouseclick(WM_LBUTTONDOWN)) delay(DELAY); getmouseclick(WM_LBUTTONDOWN, x, y); }