Answer Questions
Andrea43086 Fairly simple school project, multiple errors
I'm working on a toy problem for school. It involves a binary heap, a few classes that inherit from a base class and some various helper classes. I'm getting about 60 errors but none are descriptive enough for me to figure out what is wrong. It compiled fine before I added some of the more recent classes I wrote, but now it's screwed. I don't want to post all the code because it's so much, but here are the errors. I ...Show All
U3Bunji could you tell me the result of this code?
I hold the idea that the current result of this code is 0,but in vc6 and vc2003,it's result is 10! could you tell me why btw,the result if this code is 0 with java compiler. int main() { int a=0; for(int i=0;i<10;i++) { a =( a++); } cout<<a<<endl; return 0; } Yeah, I thought the brackets were what made the behaviour defined. But you're right, with or without brackets, this returns ...Show All
imed-deborah error C2143: syntax error : missing ';' before 'PCH creation point'
I am attempting to port a simple c++ project to MS Visual Studio 6. All my C++ programs give me the error error C2143: syntax error : missing ';' before 'PCH creation point' These programs all compile fine in Borland C++. How can I fix this. If it's just 2 files, why do you #include consts.h Perhaps there's something defined in there that's causing the problem Could you remove that #include Or if not, ...Show All
WhiteWizard Preprocessor directives gray out code
When using preprocessor directives for conditional compilation in cpp file all code between directives turns gray. #include "Config.h" #if __SOME_CONDITION__ // some code here #endif __SOME_CONDITION__ defined in Config.h. This bug appears only in cpp files. Is there any way to disable graying out excluded code None that I know of - I was hoping to disable it as well. It is by desig ...Show All
windsurfkid visual c++ dll
just wana ask.. is there any dll file in visual c++ dir of the function "compile" i nid to use it so that in my application in vbnet i will be able to compile a .cpp file and generate those extension like what the visual c++ can generate... or is ther any ways of doing it currently i am doing a c++ compiler (sort of) in vbnet but the problem now is just the compiler thing.. (coz i wana generate all those extension like what visual c ...Show All
Pure Krome MFC extension DLL project with /clr option causes link error on _DllMain
I get link errors mfcs80ud.lib(dllmodul.obj) : error LNK2005: __pRawDllMain already defined in DllMain.obj mfcs80ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in DllMain.obj The project options are MFC extension DLL /clr option (except the source file with my DllMain implementation) UNICODE character set Hi, Is this VS2003 or VS2005 Thanks, Nikola Dudar VC++ Team ...Show All
gloranger Graphs in VC++
I'm trying to draw a Graph within a Dialog Box and Without using an ActiveX. I have tried to use a CStatic control or Custom control unsuccessfully. I have tried to use a CDC object and attached the pointer on CWnd from my control but i don't manage to make it display anything. It is written in MSDN that i Should use OnDraw() to recover the right DC pointer but no Control release this event. Am i trying to do something impossible I guess n ...Show All
Satya vani inline function
I have a set of functions that I'd like to make inline using VC++ 2003. The functions are compiled sparately from the calling function. I've attempted by placing inline before the function name and in the prototype statement but the function is not found. Do I need to use IMPORT, extern or something like that I can't seem to find an example anywhere to emulate. Thanks, RON C FUNCTION: inline int index_4 ( int jstr, int ks ...Show All
mrwise 2005 Resource Editor no longer labels language of each dialog
Back in Studio 6 and Studio2003, when you would edit a dialog resource that had multiple language versions, the window title (Studio 6) or the tab title (Studio 2003) would tell you something like "IDD_DIALOG1 - Italian". This was very helpful if you had several language versions of the same dialog open at the same time. Studio 2005 now labels the tabs as "MyApp.rc - IDD_DIALOG1". This makes it much harder to be sure yo ...Show All
Huybs Kris How to get a dynamicly created control's dc
I need to create a control dynamicly and then get its DC to draw text and so on,just do as the following code: BOOL bCreate = m_hEdit.Create(WS_CHILD | WS_TABSTOP | WS_VISIBLE |ES_LEFT , rectEdit,this, IDC_COMBOTREE_EDIT); if (bCreate) { CWnd* pParent = GetParent (); CFont* pFont = pParent->GetFont (); m_hEdit.SetFont (pFont); } CDC *dc=m_hEdit.GetDC(); dc->DrawTextW(_T("ok"),-1,CRect(0,0,30,20),DT_LEFT); dc->SetBkColor(RGB(0,0,0)); m_h ...Show All
Jeff A Beck Exposing the Methods from a dll to be used in other applications....
Hello Everyone, I have a code which is made using .NET clr library.....I need to expose some functions from there to use in some other project, according to me I'm exposing in the .dll but when I use it as a refrence I dont see anything in the other project... Thats what exactly I'm doing....there are two scenarios related with this: If I do .... public ref class Z : public something { public : void TestMethod() } And ...Show All
Alex118 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
Arstan How to use .Net assembly in VS 6 C++ Project ?
Hi, I want to use a dll, that is written in C#, in my VS 6 C++ console application. Unfortunatly I can not find any way Is it possible to use it thanks.. See if reading this article solves your problem. Thank you for your response , it helps alot. I can implement the the sample. But it does not work on my dll, My C# dll is for MSMQ operations .I can send messages to MSMQ in a ...Show All
MisterChief117 Intellisense problem with VS 2005 solved?
Hi all, I've been having problems with intellisense autocompletion eversince I switched from VC6 to VS2005. It seems that on some of my classes the scope wasn't found by Intellisense (although code compiles and behaves perfectly well). After a little tinkering around, removing .ncb file, rebuilding again and again, dancing around the computer hoping for some magical change of behavior from Intellisense I was still left alone without my loved aut ...Show All
PapaLazarou How do you create a single .exe installer file?
I'm a psychology grad student at Miami U. in Ohio, and I need to come up with a way to create an installer for a program that is a single .exe file. I have been using Installshield for Microsoft Visual Studio C++ 6 to create an install disk with all the files needed for install on it. However, I need it to be just one file, so that when someone downloads it and opens it, it will begin the install and extract all the needed program files from jus ...Show All
