|
My project needs to call Matlab function, Is it possible to make it a part of my project so that it can be run without Mablab enviroment?
Thanks in advance.
|
|
|
|
|
Check this[^] out
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi.
Ive created a toolbar in c# and ive been trying to find a way to use this in vc++. can someone please guide me as to how it can be done?
thanx.
|
|
|
|
|
you should refer to this book "Inside C#"
|
|
|
|
|
ok thanx ill try to consult the book
|
|
|
|
|
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++
|
|
|
|