C++. How to run executable files in OS
#include <cstdlib>
void main() {
char* startUP = "C://myprogramm.exe";
system(startUP);
}
CLR/C++. fatal error C1190
Challenge:
fatal error C1190: managed targeted code requires a '/clr' option
Solution:
You need to create CLR Empty project in your Visual Studio and have to add code.
fatal error C1190: managed targeted code requires a '/clr' option
Solution:
You need to create CLR Empty project in your Visual Studio and have to add code.
JavaScript. Простой способ обхода механизма кэширования
В Ajax часто приходится обновлять содержимое веб-странички. Но при этом можно столкнуться с проблемой ее обновления. Многократные обращения к сценарию на сервере будут выдавать одинаковый результат. Таков механизм кэширования. Есть простой способ обойти механизм кэширования. Для этого нужно изменять URL обращений к сценарию следующим образом:
var url = "getUpdate.php";
url = url + "?dummy=" + new Date().getTime();
getTime() метод возвращает время в милисекундах (отсчет от 1970/01/01). В результате получим:
getUpdate.php?dummy=1334208621062
getUpdate.php?dummy=1334208674440
getUpdate.php?dummy=1334208697519
При этом сценарию не передаются данные. Главное - сценарий должен быть готовым к приему таких запросов и их обработки.
var url = "getUpdate.php";
url = url + "?dummy=" + new Date().getTime();
getTime() метод возвращает время в милисекундах (отсчет от 1970/01/01). В результате получим:
getUpdate.php?dummy=1334208621062
getUpdate.php?dummy=1334208674440
getUpdate.php?dummy=1334208697519
При этом сценарию не передаются данные. Главное - сценарий должен быть готовым к приему таких запросов и их обработки.
GNU Compiler Collection (gcc). cpp compilation fails
1) Input:
gcc -o test test.cpp
2) Output:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Solution. On Linux OS gcc installation is not supported 'cpp' - format file, on input gcc need put 'c' - format file:
gcc -o test test.c
Try to run compiled file:
./test
In my case it was successful. I hope it help you
gcc -o test test.cpp
2) Output:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Solution. On Linux OS gcc installation is not supported 'cpp' - format file, on input gcc need put 'c' - format file:
gcc -o test test.c
Try to run compiled file:
./test
In my case it was successful. I hope it help you
C++. Capture screenshot of desktop
This source on C/C++ show how make screenshots of desktop (Win32 platforms). Use it.

To download source and executable file - Click here. Good luck.

To download source and executable file - Click here. Good luck.
Subscribe to:
Posts
(
Atom
)