I have one Windows Service/Application running silently on the PC, when user starts any program , i need to count the time and close it down (program) in 15 Minutes. Even when the user close down the particular program ( say winword.exe) with in 15 min, and reopen it... the program should automatically close on 15 th minute...
...
I am unable to create a directory in a mapped drive. e.g. i have mapped U: to some location which there in the network. Using vc++ i am using CreateDirectory api, but it's not able to create directories. If i am giving any local machine location, it's creating. any solutions. Please let me know.
I have tried debugging my application, i ...
Hello,
I have a h- and a cpp-file with some calculations used in many of my projects.
Now I tried to put them in a separate dll, so the files should not be included in every project.
When linking I get a LNK2001 (unresolved symbol) error for a struct, however lib and dll are in the right place.
I use the
#ifdef TOOLS_EXPORTS
#defin...
Is there standard way to generate Password Hash with Microsoft development tools?
Or maybe there is most common way. (I have read that there is MD5, STA1)
Unfortunately I don't have server's source code, but have to consume SOAP web-services.
The must be some algorithm to generate hash code. I need to implement it using Java or using s...
Followup on an answer from last night - I was hoping more comments would answer this for me but no dice.
Is there a way to achieve this without inheritance that does not require the cumbersome usage in the penultimate line of code below, which writes the value to cout?
struct A {
enum E {
X, Y, Z
};
};
template <class ...
Hi I am using CTaskDialog class in my MFC application. I am trying to customize it.
In this if i want to add hyperlinks, as of now there is no specific provision for this. But to add the buttons we can use "AddCommandControl" and can handle the button.
If I want to implement similar to this AddHyperlinkControl and want to handle can any ...
When I try to compile a simple boost application with
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/managed_shared_memory.hpp>
headers in VS 2010, I get the this error message.
c:\program files\boost\boost_1_44_0\boost\interprocess\detail\move.hpp(342): error C2440: 'return' : cannot convert fro...
I have developed a DLLin c++ using visual studio 2008. I want to run static code analysis on it using a tool which requires me to compile it on command line.
How can i use cl.exe to achieve this.
My project depends on the boost date_time library and couple other referenced projects.
http://stackoverflow.com/questions/1130479/how-to-bu...
I am to create a c++ logic game with with the difficulty of 3-10 characters (@#%?) that are produced within a string randomly. The player is to guess the random characters. Once the player has guessed, the message of how many the player guessed right is displayed. I am using the switch command to have the player determine the difficul...
Need to get Visual Studio 6 Processor Pack installed on Windows 7 (32 bit).
First i installed VS6 + SP6, which prevents the PP from installing. I uninstalled VS6 and re-installed VS6 and am trying to install SP5.
It is now complaining that MDAC 2.5 or 2.6 needs to be installed first. I've tried 2.5, 2.6, and 2.8. All run through the li...
Hello!
I'm an absolute beginner to programming and i'm just doing some exercises exercises for the beginning.
First of all, i'm using Visual C++ 2010 to compile C-Code. I just create a new project and choose an empty console application. After that, I create a ressource file named test.c and change in the file properties the elementyp...
My project has legacy library which consider NULL pointer as empty string.
But when I get return data from std::wstring like this,
std::wstring strData;
const wchar* pStr = strData.c_str();
ASSERT(NULL == pStr); // ASSERT!!
pStr is not NULL but pointer which wstring point.
Can I make std::string return NULL when it has no string da...
Is there any benefit in starting a debug build without debugging (as opposed to a release build without debugging)? And what do I miss when I debug a release build (as opposed to debugging a debug build)?
...
Some people seem to advise you use -Wall, but when I did it on a small test project which just has a main.cpp with some includes, I get 5800 warnings most of them in standard headers or in windows headers.
Is that intended behaviour? How do I go about making my compilation warning free?
Here are just a few for some reading fun:
1>c:\p...
Hi,
I am a new developer of C++ and i want to do socket programming in c++ or VC++.net.
If you have good and easy to learn tutorial for socket programming in c/c++ please share the link.
...
fstream file;
Patient Obj("XXX",'M',"XXX");
file.open("Patients.dat",ios::in|ios::out|ios::app);
file.seekg(ios::end);
file.write((char*)&Obj,sizeof(Obj));
file.seekg(ios::beg);
Patient x;
file.read((char*)&x,sizeof(x));
x.printallInfo();
file.close();
...
I am attempting to complete a homework assignment and would like to make an array of data structure and initialise it with names. However, when I try to compile my code I get the following error:
**error C2440: '=' : cannot convert from 'const char [13]' to 'const char'**
I am including my code below. Please advise me what I might be ...
I want to use the following code just to check the input.
#include <stdio.h>
#include <iostream>
#include <ctype.h>
int main()
{
int number1;
puts("Enter number 1 please:");
scanf_s("%d",&number1);
if (isdigit(number1))
{
puts("Input is correct.");
}
else
{
puts("Your input is not c...
Hello,
I'm trying to pipe io through a terminal application as per microsoft's documentation (http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx). The problem is, when I add this code, it pops up a big black empty box / terminal / console window. I don't want it to do that.
Suggestions?
Thanks!
...
Hello,
Basic c++ question here. I'm trying to read a large file on Windows 7 Pro. C++ compiler is Visual Studio 2010. (ver 16.0). I'm finding that the program runs about 5 times slower on Windows 7 than one on a virtual machine running Ubuntu on the same box. Ubuntu version 10.04 using gcc 4.4.3. The file is rather large ~900MB. The cod...