Answer Questions
sachin.rao convert int to string
Hi, I want to make the following code work but I can't find a method to convert the int to a string. Any ideas string ErrorMessage( int intRec, string strKey){ return (DateTimeStamp()+ char (7) + "Record number" + char (7) + intRec+ char (7) + " contains an invalid Key:" + char (7) + strKey+ ".\n" ); } Brian, I agree about the lightweight solution. There are no portability conc ...Show All
dcallan ultra fast binary writes
Hello, can anyone please help... This is a bit of a general question. My C knowledge is limited to the K&R book. I have used the fsutil tool on windows xp and noticed that the command: fsutil file createnew c:\$delthis.bin 1234567890 which creates a file over a gigabyte in size is extremely fast - it takes about a second on a PIII 800MHz with 256MB memory. This seems to be amazing given that it zeros the whole file, rat ...Show All
Will Riley CDialog::DoModal asserting in CWnd::DestroyWindow
To Brian and Martin, who were involved in helping me out with this , please don't shout at me... This thread does follow on from that post - and I'm now investigating refactoring a static library which contains a few MFC classes into a shared DLL - using __declspec(dllexport) to export functions and classes that will be needed across all facets of the solution that need the shared functionality. I've looked all over the place for an ans ...Show All
Bobby Thurman Thread Termination
Is there any way to easily instruct windows to wait for a given thread to complete upon exit of the process in which it was created, other than explicitly calling a function such as WaitForSingleObject at the end of execution As an example, if I create a thread in order to run an asynchronous function, such as one which performs a large calculation and stores the result to a file, logically it should continue to execute until it is finished even ...Show All
Rod_Kane Option to supress warnings in standard headers?
If I'm compiling a program that uses some standard C++ headers, I get all sorts of horrible warnings. For example, compiling the following program with cl.exe: #include <iostream> #include <list> #include <string> int main() { return 0; } Generates the following output: cl test.cpp test.cpp C:\VC++2003\include\ostream(574) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specif ...Show All
Mike Royle vc++8.0 bug: access violation upon call of any CImageList methods
I have sucessfully imported and compiled a complex MFC 6.0 project from vc++6.0 into vc++ 8.0 (MFC 8.0). It contains several subprojects (libs and dlls). In vc++ 6.0 those project linked MFC6.0 statically and after I imported it to vc++ 8.0 I set the linkage of MFC8.0 to "shared". However when I try to compile and link the project in vc++ 8.0 in release mode (debugmode works fine) I get an acess violation in afxcomctl32.inl. This happnes w ...Show All
Daan van Schaijk Program runs slower when compiled with Visual Studio 2005 (in Release with optimization)
Hey, I have a performance problem with the new Visual Studio 2005. My code (which is a genetic algorithm) is 3 times slower when compiled under Visual Studio 2005 compared to when I was compiling it under Visual Studio 2003. With Visual Studio 2003, it used to run in 3.0639 seconds, and now it runs in 9.0031 seconds. I run both code in Release. I tried every optimization option, and adding the /D_SECURE_SCL=0 compiler command to the project opti ...Show All
Umamageswari LNK2028 when using /clr:oldSyntax in VS2005
It appears that the error relates to using /clr:pure, but I am not. The class it is complaining about is in the unmanaged library, and that library is specified in the link options. It was migrated to and built by VC++ 2005 from the 2003 version. I don't understand the extern "C" part of the error msg because there is nothing in this class that references any C code - it is all C++. There is a C code module in the library, but ...Show All
Eswans2000 Problem in setting PATH,LIB and INCLUDE environment variables through script for 32 and 64 bit plateforms.
Hi, I'm using Visual Studio 2005 Professional Edition. I have a script file (batch file) to launch the devenv by using /useenv. Through this script some environment variable are being set for both 32 and 64 bit plateforms. if, I need different values for both 32 and 64 plateforms,I use two variables in the script e.g. A32 and A64 otherwise only one environment variable. This is required, So, that I can c ...Show All
TonyDecasca Error while compiling C2664
Hi, I have this piece of code which I am trying to compile in VS 2005. ///////////////////////////////////////////////////////// CComBSTR combstrEventGroup = bstrEventGroup; hResult = ::UuidFromString(combstrEventGroup, &uuidEventGroupNr ); ////////////////////////////////////////////////////////////// Error: error C2664: 'UuidFromStringW' : cannot convert parameter 1 from 'ATL::CComBSTR' to 'unsigned sh ...Show All
budzombie program compiles and runs on my pc but doesn't work any other windows
I'm a complete begginer to visual studio and this is my first program There's no problem with compilation and running this program on my VS 2005 BETA 2 winXP SP2 but it doesn't work on any other windows i've tryed to run it on winXP , winXPSP2 and win2000 and gives an error the translation of the error is something like "can't run aplication because it's configuration is bad reinstaling aplication could make it run properly " it occurs i ...Show All
RandyatTradewinds Compiling Lib
Hello there, There is a library program that I am trying to compile using VC++ version 6. Followed this instructions: "Here's step-by-step instruction posted by one of the list subscribers: good luck >>> Subject: FW: [Quantlib-users] Installing QuantLib using Dev-C++ 4.9.9.2: WORKING From: "xxxxxx" <xxxxxx> Add to Address Book To: quantlib-users@lists.sourceforge.net Date: Wed, 13 Jul 2005 12:12:41 +0800 ...Show All
Daigo Hamura Bug: .RC file fails to save, and then VS 2005 crashes on exit
I open up a solution, and open the "String Table" of a resource script in one of my projects. I add a string, and attempt to save. Nothing happens, the file remains marked as needing to be saved. When I exit Visual Studio it asks me if I want to save, and I say yes, and then it crashes. Here are the crash details: Access violation: 0xc0000005 AppName: devenv.exe, Appversion: 8.0.50727.42 ModName: ntdll.dll, Modversion: 5 ...Show All
asmasemsema delete list of array^ gives compile error
The following will not compile, can anyone help I use: Microsoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) Microsoft .NET Framework Version 2.0.50727 My code: int main( array <System::String ^> ^args) { List< array < float >^>^ list = gcnew List< array < float >^>; for ( int n=0; n<5; n++ ) { list->Add( gcnew array < float >(4) ); } ...Show All
jarjar Why does VC2005 always rebuild all files??
I am using VC2005 IDE with VC2003's excutables, includes and libraries. Becuase my project( orinally VC6.0 project ) have many library compiled with single thread runtime, I can't use VC2005's excutables, includes and libraries. Anyway I suceeded to compile my project. My problem is the follwing. Let's suppose I am building "MyProject". Whenever I choose "Build Only MyProject", VC2005 always rebuild all files i ...Show All
