#include<stdio.h>
int main()
{
return 0;
}
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/786"></script>
/* pour parcourir une string (ou tout autre conteneur indicé) dans l'ordre inverse */
for (size_t ind = Str.size(); i--;);
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/500"></script>
Dans un des fichiers c de votre projet :
:make Lance la compilation du programme et positionne le curseur sur la première erreur s'il y en a une.
:cnext Positionne le curseur sur l'erreur suivante.
:cprevious Positionne le curseur sur l'erreur précédente.
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/462"></script>
Vim peut indenter automatiquement du code source (c, java, ...)
Sélectionner la partie du code source à traiter en mode visuel (v)
Appuyer sur la touche =
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/461"></script>
// Declaration socket
WSADATA WSAData;
SOCKET sock;
SOCKADDR_IN sin;
// Initialisation socket
WSAStartup(MAKEWORD(2,0), &WSAData);
sin.sin_addr.s_addr= inet_addr("127.0.0.1"); // Adresse IP
sin.sin_family= AF_INET;
sin.sin_port= htons(4001); // Port
sock = socket(AF_INET,SOCK_STREAM,0);
bind(sock, (SOCKADDR *)&sin, sizeof(sin));
// Si connection etablie
if (connect(sock, (SOCKADDR *)&sin, sizeof(sin)) == 0)
{
// Declaration socket
WSADATA WSAData;
SOCKET sock;
SOCKADDR_IN sin;
// Initialisation socket
WSAStartup(MAKEWORD(2,0), &WSAData);
sin.sin_addr.s_addr = inet_addr("127.0.0.1"); // Adresse IP
sin.sin_family = AF_INET;
sin.sin_port = htons(4001); // Port
sock = socket(AF_INET,SOCK_STREAM,0);
bind(sock, (SOCKADDR *)&sin, sizeof(sin));
// Si connection etablie
if (connect(sock, (SOCKADDR *)&sin, sizeof(sin)) == 0)
else
// Fin
closesocket(sock);
WSACleanup();
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/392"></script>
// Fonction pour redemarrer Windows avec les MFC
void RestartWindows(void)
{
// Declaration
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
// Get a token for this process.
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
// Get the LUID for the shutdown privilege.
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,&tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1; // one privilege to set
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
// Get the shutdown privilege for this process.
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
// Shut down the system and force all applications to close.
ExitWindowsEx(EWX_REBOOT| EWX_FORCE, 0);
}
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/377"></script>