|
you now , there is a OLE/COM Object Viewer in MS visual c++, which can be used to view the type libaray.
I am viewing a huge type library and find it very dificult to locate a specified interface. is there a search tool or something like this to find it quickly?
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
I normally just copy the IDL into notepad and do a text search.
Steve
|
|
|
|
|
good idea
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
Hello!
On the graph display we have many overlapped text. Is there any good algorithms to resolve this problem, so that we have a readable layout ?
Thanks
|
|
|
|
|
if its a bar graph, draw the text vertical and not horizontal,
-Prakash
|
|
|
|
|
|
You can just cast it, because they are both the same size.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Gosh.
char * pChar;
unsigned char * pUnsigned = (unsigned char *) pChar;
If you didn't know how to do that, I recommend you read some resources on pointers.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Hi all, I want to use the STL library in my program. When I try to define the vector inside the header file, it gave me an error. Following is my program
// LMRectangle.h file //
#include <vector>
class LMRectangle
{
public:
...
private:
...
vector<vector> _vertexList;
};
The class Vector is a user-defined class. I really need this vector data structure and also other files will need the LMRectangle later, so the _vertexList has to be in the header file. Could somebody tell me a solution about this please??? Thanks very much!!!!
Asura
-- modified at 17:02 Tuesday 10th January, 2006
|
|
|
|
|
Ming Luo wrote: Hi all, I want to use the STL library in my program. When I try to define the vector inside the header file, it gave me an error. Following is my program
// LMRectangle.h file //
#include <vector>
class LMRectangle
{
public:
...
private:
...
vector _vertexList;
};
The class Vector is a user-defined class. I really need this vector data structure and also other files will need the LMRectangle later, so the _vertexList has to be in the header file. Could somebody tell me a solution about this please??? Thanks very much!!!!
You need to specify the namespace and the template parameter type.
e.g. std::vector<int> _vertexList;
Regards,
Nish
|
|
|
|
|
Thanks alot, you saved me!!!!
Asura
|
|
|
|
|
Hi
std::vector this notation solved the problem, but now there is another problem that because the Vector class is user-defined, in the header file, it complains that the Vector is undeclared identifier. I tried to include the Vector.h header file in this header file, but it complains that Vector class is redefined. How should I solve this problem then???
// LMRectangle.h file
#include "Vector.h"
class LMRectangle{
public:
...
private:
...
std::vector<Vector> _vertexList;
}
This is the code.
Thanks very much
Asura
Asura
|
|
|
|
|
What's there in Vector.h?
Regards,
Nish
|
|
|
|
|
Vector.h contains the definition of the Vector class which I want it to be stored in the
vector<Vector> _vertexList.
Thanks
Asura
-- modified at 17:57 Tuesday 10th January, 2006
|
|
|
|
|
Okay, you need to #include <vector> as well as your custom "Vector.h". I hope you are doing that.
Now if you are getting an error that Vector is not defined, it probably means, there's something wrong about the way it's defined in Vector.h.
Can you copy/paste the declaration of the class Vector from Vector.h?
Also copy/paste the compiler error message here.
Regards,
Nish
|
|
|
|
|
The Vector.h file is something like:
class Vector{
public:
...
private:
...
};
simple like that.
When I defined the LMRectangle.h file like this:
#include "Vector.h"
class LMRectangle{
public:
...
private:
...
std::vector<Vector> _vertexList;
}
I will get the compiler errors
e:\C++ Projects\Topology\Vector.h(3): error C2011: 'Vector' : 'class' type redefinition
e:\C++ Projects\Topology\LMRectangle.h(7): error C2011: 'LMRectangle' : 'class' type redefinition
Otherwise, if I comment out the first line of the LMRectangle.h file, it will generate the following errors;
e:\C++ Projects\Topology\LMRectangle.h(25): error C2065: 'Vector' : undeclared identifier
e:\C++ Projects\Topology\LMRectangle.h(25): error C2955: 'std::vector' : use of class template requires template argument list
e:\C++ Projects\Topology\LMRectangle.h(7): error C2011: 'LMRectangle' : 'class' type redefinition
e:\C++ Projects\Topology\Vector.h(3): error C2011: 'Vector' : 'class' type redefinition
e:\C++ Projects\Topology\Vector.cpp(30): error C2501: 'Vector' : missing storage-class or type specifiers
Thanks
Asura
|
|
|
|
|
Has "Vector.h" got include guards? The file should look something like this:
<br />
#ifndef __VECTOR_H__<br />
#define __VECTOR_H__<br />
<br />
<br />
#endif // !__VECTOR_H__<br />
The "'class' type redefinition" make we wonder if this is the problem.
Steve
|
|
|
|
|
Why are you creating a header file just to define a vector ? Does this mean this vector is global ? If so, you should declare it in your stdafx, if you have one ( or better yet, don't make it global ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anyone recall the name of the professional product that maps out a running process and shows which routines are being hit and how frequently? Its on the tip of my tongue. :/ Googling for "process mapping" isn't very concise.
In any case, what I would ideally like to find ( it probably doesn't exist ) is software which identifies all the function calls in a running process, represents them on the screen as colored squares, and colors them accorded to a weighted value ( how frequently that code is hit ). Every time a function is hit its respective box will highlight green. Each box would show the functions address offset.
Dang I can't remember the name of that software....
|
|
|
|
|
Mithra4096 wrote: Does anyone recall the name of the professional product that maps out a running process and shows which routines are being hit and how frequently?
It's called profiler.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
|
Looks interesting. I see from their reviews page you've used it Any more comments? What was the problem GlowCode found that other tools couldn't?
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
G'Day Taka,
I've been using it for quite some time. It is very good at pinpointing where bottlenecks occur. It can also find leaks.
I've not used other any profilers with VC++ code.
The nice thing about Glowcode is you don't need to do anything to your code in order to use it.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|