Answer Questions
_wim Issues arising from type Nullable<T>^
(With VS2005 Pro) Should type Nullable<T>^ be allowed at all When a nullable type is boxed, the new object is of the target type. Nullable<int> n = 17; Nullable<int>^ nbox = n; bool b = (nbox->GetType() == Nullable<int>::typeid); // false Object^ o = nbox; int^ ibox = dynamic_cast<int^>(o); bool eq = ibox == o; //true However, when I type ibox==o at the Immediate window, it evaluates to false, despite the varia ...Show All
lilixx Why do I get OutOfMemoryException?
Why do I get OutOfMemoryException running the following code m_lst = gcnew System::Collections::Generic::List<array<double>^>; for(int i=0; i<10; i++) { m_lst->Add( gcnew array<double>(512*512*100) ); } (Create a WinForm app and insert this code at the end of InitializeComponents) I got the exception when i=5. (that is only ~1GB of memory). I know that is a lot of memory, but my computer has 2.5GB of RAM ...Show All
stanb Error C2894
Hello. I am writing simple pakcet sniffer and i am using WinPcap. And when i try to compile my project occurs error C2894 "Error 1 error C2894: templates cannot be declared to have 'C' linkage C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wspiapi.h 44 ". Here is the definiton of the template: #ifndef _WSPIAPI_H_ #define _WSPIAPI_H_ #include <stdio.h> // sprintf() #include <stdlib.h> ...Show All
Sarang Baheti malloc error in C
>c:\s.t>cl /MD /GS- a.c >Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.41 for AMD64 >Copyright (C) Microsoft Corporation. All rights reserved. > > x.c > Microsoft (R) Incremental Linker Version 8.00.40310.39 > Copyright (C) Microsoft Corporation. All rights reserved. > > /out:x.exe > a.obj > > T:\s.t>x > 3000000000 0 > > c:\second.try>type a.c > // cl /MD /GS- > #include&l ...Show All
Priyank C declaring a stream
hi..... i'm trying to open a binary file using iostream, so i need to declare a stream. how can i structure the stream so that it read my file as i want it to i need the stream to read my binary file as integer. thanks! Gnuplot is a standalone program, not a C++ library. There's documentation for gnuplot that would teach you a lot better than we could. There's documentation for gnupl ...Show All
Program.X need english
Getting ready to work on another lab for school and I'm having trouble understanding the lab. This is the program they want me to write: Write a program that declares two twenty-element, one-dimensional integer arrays. Your program should fill these arrays with random numbers by calling a function called Fill_It. You will call Fill_It twice, once for each array, and ask the user to enter two different seed values. Fill_It needs to have a seed va ...Show All
hernanac parse the login name
I have login name like domain \username, I tried to use strtok to parse it. However, strtok can not recognize "\". For example, char ustring[] = "domain\username"; sLogin = strtok(ustring, "\\" ); sDomain = sLogin; while( sLogin != NULL ) { sUser = sLogin; sLogin = strtok( NULL, "\\" ); } Output both sDomain and sUser are domainusername However, if I change ustring to the following by adding one more ...Show All
KombatNT How to create a control with a gradient background
I would have figured that this sort of capability would be part of the standard VS 2005 controls, especially considering the extent to which MS uses gradients in their own apps for button backgrounds and such...it is not too much to ask, is it anyway... Since the standard controls in VS 2005 do not seem to support gradient backgrounds I have made a custom GradientButton class derived from the Button class. I'd like it to have a gradient backgro ...Show All
lakshmiy Dialogs in Dialogs
If creating a MFC application, is it possible to put dialogs inside an other dialogs (sub dialogs) Yes, it is possible. For further investigation, you should consider working with the MSDN Discussion group for Win32 UI issues: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.ui&lang=en&cr=US http://www.codeproject.com/ ...Show All
Joseph Molnar Does 8.0 (2005) support __asm on x86-64?
One of the biggest problems we're currently having in porting our graphics code to x86-64 is that VC++ 7.x doesn't support __asm on x86-64. We need it because we must reference various C++ structures from within the assembly code, and converting all our header files to MASM would take a long time. It would also make it difficult to maintain the code, as structures would need to be modified in two places. We haven't tried VC++ 8. ...Show All
Iyigun MFC and WebBrowser control
Hello, currently I am upgrading a C++ MFC Visual Studio 6.0 application to Visual Studio 2005. In this application I use the webbrowser active x control for displaying a browser (see http://www.codeproject.com/winhelp/html_help.asp ). Compilation with VS2005 works fine but when I run the program I get a runtime assertion in file occcont.cpp:950 ( ASSERT(IsWindow(pTemp->m_hWnd));) when creating the webbrowser control. Any hints on how to avoi ...Show All
honclfibr using or not using namespaces
this work : #pragma once #using <mscorlib.dll> #using <System.dll> #using <System.Windows.Forms.dll> using namespace System::Windows::Forms; __gc public class C_SimWindowForm : public Form { public: C_SimWindowForm(){ MainMenu* teste = new MainMenu(); &nb ...Show All
noobie LNK2019: unresolved external symbol error when i compile my win32 app
I am kinda new at this c++, and i am try to to make a Open GL application that when run will make a cube and rotate it on the screen. When i compile my project I get the about 21 different "LNK2019: unresolved external symbol errors". maybe some one can help me figure this out. If you need the project files I can send it too you. I am using visual studio C++ .net 2003. I also tried this code in visual 2005 and received the same thing. the e ...Show All
kagemusha error LNK2001: unresolved external symbol ___CxxFrameHandler3
Hi, I am working on a project to migrate a program from 32-bit to 64-bit. The program works fine on 32-bit machine under VC 7, but when I tried to compile it in VC 8 on a 64-bit machine, I received the following linking error: error LNK2001: unresolved external symbol __CxxFrameHandler3 What is the possible cause for this error and how to fix it (i have already tried the suggestions posted  ...Show All
DGMoffat VC2005 %50 Slower then VC2003
I just migrated a graphics application from VC2003 to VC2005. After building it, I ran a small benchmark & found that VC2005 code was about %50 slower. The Application does a great deal of floating point and integer calculations. It also converts doubles to int quite a bit (the VC2003 version used SSE to handle this). The VC2003 version used /G7 and /Ow (which are not available in VC2005) Compiler Switches Used: (vc2003)/arch ...Show All
