visual-c++

Nested comments in Visual C++?

Is it possible to enable nested comments (/* /* */ */) in Visual C++? I can't seem to find the switch, if there is one. ...

Is it possible to compile assembly code in MSVC++?

Is it possible to create, edit, link, compile (is compile the word?) etc. assembly code in MSVC++? Also, if it's not possible, how can I create an .exe out of plain text, ie: convert the text into whatever format is required to use assembly code, then turn the assembly code into an .exe. (I'd say compile, but I don't think that is the c...

does user.dmp contain only the most recent crash

Hi, I wanted to know if the "user.dmp" created by drwtsn32 has only the most recent crash. I tried to capture a few crashes. But when i tried to analyse it, I just see one crash. Thanks for the help, Arun ...

How to build a native YouTube Player in C++ application ?

I would like to build a native YouTube Player in my Visual C++ application, like the one in iPhone. Anyone has a hint ? Thanks ...

How to use /NODEFAULTLIBS option in compilation ?

Hi i hav solution explorer contains 2 proj.for one project i enable /clr with /mdd. for parent project i hav /mtd and no clr support.when i compiling this i am getting two linker errors including the below one Link warning link 4098:Default lib can conflict with other lib use /NODEFAULTLIBS library so my question how to use /NOD...

What are the most-used string types in C++ and how to convert between them?

OR How to not kill yourself or someone the next time the C++ compiler twists your arm to convert between 2 arbitrary string types just to mess with you? I have a tough time coding in C++ since I am used to VB6, C#, Ruby, for string operations. But now I've spent over 30 mins trying to log a string containing 2 guids and a string to the...

Using a .lib file from C

I am new to C/C++. I have a static library (.lib) file created using VC++. (I also have .h file for it). And I need to use this in a C program. Can you please help me doing this? Thank you, Prashanth. ...

Description of VC++ preprocessor symbols

Is there an overview somewhere of the available Visual C++/Windows SDK pre-processor symbols, like _CONSOLE, _WINDOWS, WIN32, WIN32_LEAN_AND_MEAN, etc.? What I'm interested in is not just a list, but also (links to) descriptions of the effects of defining each of those symbols. ...

To find the directed path between two nodes in Partial directed graph using BOOST Graph libraries.

Hi, Dear all, I am working on Partially Directed Graph (PDAG). For direction i am using weight property. Now i want to find is there any path between given two nodes A and C ? Can any one guide me how i can do this using BOOST Graph libraries. I find transitive_closure property but please guide me how i can tackle this method using ...

makedepend equivalent for use with nmake?

Just wondering if there is a 'makedepends' equivalent that ships with visual studio that I can use with nmake. Does anyone know? ...

64 bit dll in 64 bit process Vista fails - Unable to load DLL 'dllname': The specified module could not be found

Hi Everyone, I have a native C code, I compiled the code in vc++ 2008 and its compiled with 'x64' as platform in configuration manager and I have an c# application which is also compiled with 'x64' as platform and it calls the dll function. I have used Dllimport to call the function from the dll like below. using System.Runtime.Interop...

how to avoid lnk2005 error in visual studio.

Hi any body plzzzzzz help me to remove linker error 2005. I am vexed with these errors libcmtd.dll msvmrtd.dll some element(ex: _mkdir ) alredy defined like error.. ur support wil greatly help for me. "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo...

How much memory was actually allocated from heap for an object?

I have a program that uses way too much memory for allocating numerous small objects on heap. So I would like to investigate into ways to optimize it. The program is compiled with Visual C++ 7. Is there a way to determine how much memory is actually allocated for a given object? I mean when I call new the heap allocates not less than th...

What are the different calling conventions in C/C++ and what do each mean?

There are different calling conventions available in C/C++ stdcall, extern, pascal etc. How many such calling conventions are available and what do each mean? Are there any links that describe these? ...

Which version of MSXML should I use?

Seems like this would be a common question, though I could not find it on SO. Which version of MSXML should I use in my applications, and more importantly, how should I decide? There is MSXML3, 4, 5 and 6. I recently posted some code in calling-wcf-service-by-vbscript that used MSXML v4. AnthonyWJones posted that I shouldn't use 4...

Standard Template Library using g++

While migrating a program from windows in linux I encountered a problem using the c++ standard template library. I am trying to typedef a template and I am getting the error 'expected initializer before '<' token on this line typedef std::list< std::pair< int,double> > PairList; Any ideas why this would work using mvc++ and not using g...

Serial Port Communication

Hello, I want to send data hex format (0x01) or (0xff) to the port where rs232 cable is connected. I am using the MSCOMM control in VC++ 6.0. Is that the correct way to send the hex data. This is the code I have. CString output; UCHAR data1,data2; data1=0x01; output.Format("%x",data1); m_mscom.SetOutput(COleVariant(output)); data2=0xff;...

how to define interfaces in managed c++/c++

Hi Can we define interfaces in c++ using visulastudio? if yes plz help me in defining interfaces in c++ with example... Thanks in advance ...

Is it possible to convert UTF32 text to UTF16 using only Windows API ?

I'm trying to find converting UTF-32 text to/from any code page is possible using the Windows API alone. I cannot used CLR to do this task. The Code page identifiers page at Microsoft at http://msdn.microsoft.com/en-us/library/dd317756(VS.85).aspx lists UTF-32 as being available to only managed applicatiosn. ConvertStringTo/FromUnicode...

How to use CLR in a different runtime environments under multiple projects in visualstudio??

Hi Here is My Scenario. I have an Existing Solution in visualstudio which contains 15 projects. in some project i need to use managed c++ extensions. So first i have a workaround for sample solution contains 4 projects in those i have maintained dependencies b/w them. and my solution is builded also. I apply the same procedure to ex...