|
That's what's confusing me. If it happened everywhere I would at least have a starting point.
|
|
|
|
|
Try to disable all your code. If error still exist, try to delete and create another child
|
|
|
|
|
I know that VS2005 is still in beta, and would like to dip my toe into the 2005 experience/IDE along with C++/CLI. I know that VS2005 was available for free download a while ago but unfortunatly i missed the boat! - I am not an MSDN subscriber? Is it possible for me to download the beta of VS2005 from anywhere else?
Cheers
|
|
|
|
|
|
thats excellent.. thankyou
|
|
|
|
|
|
HI all
I have the following problem .
I have a COblist member declared as protected in a class
CObList m_DataList;
Now in the virtual destructor of the same class
the data is cleaned up like this...
while(!m_DataList.IsEmpty())
delete m_DataList.RemoveHead();
...here assume the m_DataList has N elements ...
deleting N-1 elements is not a problem ..but when the Nth element is Removed from the m_DataList then Assertion occurs ..saying
Invalid heap pointer !! . I could not understand this at all ..
When the destructor is able to delete all the elements except the last one what could be the problem ?
Why should I face assertion when the last element is deleted ?
Can someone help me pls ?
dharani
redindian
|
|
|
|
|
First of all, you should investigate STL containers, MFC containers are crap.
Have you looked in the debugger to see the state of your pointers ? Is it possible that the problem is that you're stuffing IN an invalid pointer, and you don't see it until you try to delete it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I will give the vertices of outer polygon, the code need to generate the vertices of inner polygon , with given tolerance for e.g. 50 mt.
|
|
|
|
|
Got the geometrical algorithm ? code comes next
Or r u expecting a ready made code for ur requirement ?
redindian
|
|
|
|
|
hi i am new to cpp using include
#include studio.h
#include
i used iostream before though now i am trying to make a simple code for input and comparing the input could anyone help me? i just need some simple beginning code thx u
|
|
|
|
|
Hi!
I'm not quite sure what you're asking about, but if it is how to use include then I'll give it a shot.
#include is a preprocessing directive, that means that it's performed before the code is compiled (in a separate pass). When you use #include, the preprocessor will behave as though it copies the contents of the file you want to include into the place where the #include directive was (some preprocessors might create a new file and paste it all together, while some might do it in memory etc.). There are two different ways to use #include. The first one is with angle brackets and the second one is with quotation marks. The difference between these is where they search for the files to include.
#include <stdio.h> // Include an include file that usually came with the compiler
#include "myinclude.h" // Include a file in the current directory
When using angle brackets the preprocessor will search for the file among the include files that came with the compiler or other directories you have added to its search list. The quotation mark on the other hand will make the preprocessor first search through the current directory (project directory) and if it didn't find any files who matched the name, it will search through the same directories as if you had used angle brackets.
|
|
|
|
|
firstly, be careful of what you write ... studio.h don't exist. the correct file is stdio.h (std means standard, io means input/output, and .h for header file. < > means that the compiler will search the file into its own headers directory instead of within the current project).
to use C++ standard streams, you'll have to include <iostream> . You see that there is no .h ending the file name, jut because it haven't any. by opposite to stdio.h, iostream is no inheritated from the C language. It is a header from the standard C++. The .h were removed because Stroustroup considered that it was redondant...
now, what can happen is even if you included the file, you cannot access the stream functions because they are not in the same namespace as from where they are called. the easiest way to solve this it to put at the beginning of the local scope where you would use cout /cin this instruction :
using namespace std;
hope you understood the most
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi!
I'm making a GUI for an engine I'm working on. The engine is separated into two win32 dll's and the GUI is supposed to be written in C#. I've decided to make the interface between C# and the engine using C++/CLI since that seems like the cleanest and best solution. So what I have is the following:
EngineA.dll - the two engine dll's in win32 code
EngineB.dll - *
SVCore.dll - The C++/CLI interface class. Exposes functionality from the engines
SceneViewer.exe - The gui
Now the problem arises when I'm trying to include a reference to SVCore into the SceneViewer project (etiher a reference to the project or to the target dll). The class compiles and I get the following warning:
"Warning 8 Could not load file or assembly 'SVCore, Version=1.0.2057.40039, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
The other problem is when I try to use a canvas control that's using SVCore. I get a similar error message saying that it failed to create the component because it failed to load SVCore or one of its dependencies.
Now I've found out that this is because the designer doesn't seem to find the engine dll's. I just find that strange since I've tried to place them everywhere within the project folders. Everything seems to work fine though when I put the dll's in the system32 directory - but this is NOT an option at all (editing the path is not an option either). So does anybody have any solutions as to how I should set up my projects for this to work? Or any other way to fix the problem?
Thank you in advance!
|
|
|
|
|
Hi _eulogy_,
I ran across your post over on the Microsoft Technical Forums. Pretty interesting stuff,...that left me thoroughly mystified.
Does your SceneViewer code derive from the IDesignerHost interface?
Given the sophistication of your project, I can't imagine that Visual Studio can't find your DLLs (this is TOO simple an error, and you obviously know your way around the compiler).
I've noticed that sometimes (and this happens to me all the time), if you create multiple intersecting errors that don't conform to the compiler's internal diagnotic logic, it will issue an error message, but that message will be misleading.
|
|
|
|
|
Thank you for the interest
No, I'm not inheriting from IDesignerHost and I'm still puzzled by this problem. I've found that doing the following things work:
1: Put the engine dll's in windows\system32
2: Put the location of the engine dll's in the path
3: Put the engine dll's in the same folder as devenv.exe
Point number three made me a bit more certain about a suspicion I had. It seems as though the ide loads up the managed dll's as normal from their right directories, because thir whereabouts are stored in the project. The unmanaged engine dll's on the other hand are only referenced by one of the managed dll's and in an "unmanaged way". The problem might be that the ide thinks that the current search directory is the same as the running exe resides in (which happens to be devenv.exe) and not the directory that the managed dll resides in or the directory pointed to by the project.
This is only a hypothesis though (hope my ramblings made sense :P).
|
|
|
|
|
Hmmm... seems like I was suddenly logged out.
|
|
|
|
|
I read what the responses were over at MS Technical Forums. I was on the wrong track with my last question.
In Visual C++ .NET you reference another .NET assembly by inserting the #using directive in your source code. You also, as you now know, must set the LIBPATH variable that the compiler uses to search for your associated .NET assemblies. This can be done very simply by opening the Property pages for your Project (from the Solution Explorer). The following MSDN information will explain this:
The Using Directive[^]
And, you might want to read this, it describes how to set the path of directories that Visual Studio looks in for project files and Dlls.
VC++ Directories, Projects, and Options Dialog Box[^]
Referencing an unmanaged Win32 DLL is different. You must use Interop.
Consuming Unmanaged DLL Functions[^]
A better solutuion would be to use the Type Library Importer to convert your Win32 DLLs to assemblies, which can then be used in a managed project as if they were .NET assemblies.
Type Library Importer[^]
|
|
|
|
|
ok i want to know the way how can i get the list of items shared on any computer. i want my application to search the network for available items or shared folders files on network that are accessible
|
|
|
|
|
Hi there,
I just need some help in regards to how to change the row color of a dataGrid based on a specific value? I have a dataGrid reading in some information from an XML file. Each row representing a single entry which includes a date. What I want to be able to do is change the text color or row color, for say all entries containing today's date? How can I do this? Help!
btw: I'm using Visual C++ .Net
Any feedback you can provide will be greatly appreciated!
|
|
|
|
|
I can't find any setting for the collor. If you realy need grid control, try looking internet for alternative grid. or Use ListView Control. With ListViewItem you can change for BackColor or even Font(I think).
PS: Sorry for my poor english
|
|
|
|
|
I'm having a problem with including the pthread.h as I would like to complete several tutorials, such as :
http://www.llnl.gov/computing/tutorials/pthreads/#CreatingThreads
or
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
The pthread.h is located in stlport directory (Borland C++ 6), including it with #include <stlport/pthread> seems to work but then I'm getting an error message within the pthread.h itself on the line :
# include _STLP_NATIVE_C_HEADER(pthread.h)
[C++ Error] pthread.h(26): E2209 Unable to open include file 'oldstl/pthread.h'
when I copy the pthread.h file into oldstl directory
I get a different error at thesame line within pthread.h
[C++ Fatal Error] pthread.h(26): F1005 Include files nested too deep
I have searched for the sollution to this for 2 days now with no luck
I hope someone is able post sollution to this problem or a step by step instructions on how to include this file.
|
|
|
|
|
firstly comfirm thst the functions is in the file you just included;
secondly had you set the environment apth before? do it
路漫漫其修远兮,吾将上下而求索。
|
|
|
|
|
You can't just move header files in libraries around, you need to make sure you're able to see them ( that their folder is in your lookup path, or you've explicitly stated the path to the file ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you for the answer, I'm a total beginner but would like to figure this out.
I have set the path with :
C:\program files\borland\CBuilder6\include\stlport;
I added that line to path under Enviroment Variables in computer properties.
The path is clearly added (when I type path in command box its there)
But I still get the error that pthread.h cannot be opened
Edit :
Nevermind, I found it
|
|
|
|