|
I have to call some code written in a project compiled as old syntax /clr:oldsyntax, from an unmanaged zone in a project compiled with the option /clr (new syntax).
Is this possible?
the compiler generates C3699: Cannot use this indirection when I tried to use gcroot<MyForm*>.
I don't have the time to convert the code compiled in old syntax to new syntax.
Thanks,
HZ
|
|
|
|
|
There is no alternative other than converting all managed c++ syntax to c++/cli if u need to compile it with /clr new syntax.
cheers...milton Kb
|
|
|
|
|
which is better vc++ 6.0 or vc++.NET .based on performance, speed and portability?
bhag
|
|
|
|
|
definitely, VC2003, as the compiler is much more compliant to the standard (but not as much as VC2005 though).
however, as you're asking on the managed C++ forum, let me warn you about the fact that VC6 don't allow you to code for the .NET framework.
ps: can someone explain what's wrong with what i said there ?
-- modified at 5:25 Monday 31st July, 2006
|
|
|
|
|
thanx.
but the thing is that my mentor has asked me to decide which is better for engineering purposes..i mean it deals with graphics , data entry like that..
bhag
|
|
|
|
|
|
|
This forum is for managed C++, try the native C++ forum.
|
|
|
|
|
crap
|
|
|
|
|
Can anyone give the output of this:-
i = 10;
int j = i >> 10;
cout<
|
|
|
|
|
duh. Why do you want us to ? What's your actual question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
you might need some binary stuff to learn...
|
|
|
|
|
NULL, every one-bit is shifted of the block.
|
|
|
|
|
=1/128+1/512=0.0078125+0.001953125=0.009765625
right or wrong?
I love this web
|
|
|
|
|
I'm trying to create a class that I don't want anyone to be able to create a handle to, aside from another specific class. In native c++, I could this by just declaring the creator class as a friend to the class I'm restricting creation for. However, in C++/CLI, it won't allow me to have friends for a managed type.
Does anyone know how I could get around this problem?
-Kevin
|
|
|
|
|
The absence of friend classes is a real problem in .NET, IMO. I'm not sure there's a way around it, if you want the actual class visible, but not the ability to create. Does your class derive from anything right now ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi! I'm learning about linked lists and have created the following class:
<br />
<br />
struct Node<br />
{<br />
int data;<br />
Node *next;<br />
Node *prev;<br />
};<br />
<br />
class BasicList<br />
{<br />
public:<br />
<br />
BasicList();
<br />
<br />
void Prepend(int n);
void Append(int n);
void InsertAfter(int key, int n);
void InsertBefore(int key, int n);
void Swap(int first, int second);
void Remove(int key);
<br />
<br />
void DisplayNodes() const;
bool IsEmpty() const;
int Maximum() const;
int Minimum() const;
int Occurances(int key) const;
int NumNodes() const;
<br />
<br />
Node *GetAddress(int n);
int *GetDataArray();
<br />
private:<br />
<br />
<br />
Node *head;
Node *tail;
};<br />
<br />
All the functions work wonderfully so far. I want to add a method that will sort the linked list data. I'm not really sure where to begin. I checked Wikipedia, and found the following URL which presents a MergeSort algorithm. I'm not sure if this is the best way. Any opinions?
http://en.wikipedia.org/wiki/Merge_sort
|
|
|
|
|
How can I clear screen screen in simple C languange , NOT in C++
system(cls") , or cls() or , clrscr() are not working
Regards.
|
|
|
|
|
This is the managed C++ forum. Managed C++ can NEVER be just C. This is the wrong place to ask this.
Define 'not working' when you ask this again in the right place.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello everybody,
We are planning to work on a project. The client side will be created with VB.net. This VB.net will call the backend of c code. I did the similar thing with php to call the backend of c code. The bridge between the php and c code was created with php extension for wrapping c code. Could you give a suggestion what kind of bridge will be created between VB.net and c code?
Thank you very much for your any suggestion
Jane
|
|
|
|
|
JaneQuestion wrote: what kind of bridge will be created between VB.net and c code?
VC++ has "managed extensions". You can create "mixed mode" projects. What you want is a mixed mode Class Library. The .NET classes that you author in this library will then call into the "native" C code. When authoring such code you will be handling the marshalling of data from native memory into managed memory and managed memory into native memory where ever it is required.
The .NET classes you author can be used from any .NET compiler including VB.NET.
JaneQuestion wrote: The client side will be created with VB.net
C# would be a better choice.
|
|
|
|
|
Thank you very much for your information. Do you know where I can find this kinf of sample code?
Jane
|
|
|
|
|
Thank you very much for your reply. But our project requires that the client side will be implemented in VB.NET, the backend was implemented in C, which will talk with hardware device. I need to make a bridge between VB.NET and C. Any good suggestion?
Thanks a lot in advance
Jane
|
|
|
|
|
JaneQuestion wrote: Any good suggestion?
I don't understand, I gave you a suggestion. Why do you ask for one?
|
|
|
|
|
Hello,
I'm a student working towards a BS in CS. I use Visual Studio C++ as my IDE.
I go through a lot of paper writing out solutions to problems. I've found that this greatly helps me when designing my code and it's something I've found suggested many many times.
Last year, I was playing around with Visual Studio 2005 Beta and found something called "Whitehorse." It was excellent! It allowed me to create diagrams and drawings of my code. It actually would generate drawing and diagrams from my code and modify my code to match a diagram if I asked it to.
I haven't found similiar functionality in Visual C++ 2005 Express. I'm (very sadly) assuming that it's not there.
I'm REALLY hoping that someone may have an alternative solution for something that works well, and is free. I REALLY appreciate any suggestions.
Thank You,
Nathan Farrar
http://yogensha.com/
|
|
|
|