|
Hi Milton KB,
I get lots of crashes related to new operators. Each time I allocated with new a CDC object, it might crash. I have the feeling that during the new operation there might be a conflict between the managed and unmanaged heap. Do you have any idea what i could do in this case?
|
|
|
|
|
There shouldn't be any crash normally. can u b more specific by posting some code which causes error..
Milton KB
|
|
|
|
|
Im trying to create an AsyncCall back instance but i get a weired error :
Code:
Static void function()
{
...
AsyncCallback* callback = new AsyncCallback(TestMethod, &TestMethod);
...
}
the error is:
error C3363: 'void ClientRequestReceived(System::IAsyncResult __gc *)' : cannot create a delegate handler for 'System::AsyncCallback' from a non-member function or a member of an unmanaged class
how do i fix this error?
Thanx in advance
Upon my end shall i begin?
Forsaking all i've fallen for..
i rise to meet the END!!
|
|
|
|
|
In C/C++ can any "macro" take variable number of arguments? Is it possible any way?
Pradosh
|
|
|
|
|
depends of the compiler. with VC6, i'm sure you can't, but on later versions, i don't remember how you can do such macros though
|
|
|
|
|
|
It's working in VC++ 8. I could not check it in any other compiler.
Pradosh
|
|
|
|
|
% is for tracking references to CLI object
& is for passing native heap objects
If I use % and pass a native object, what is the compiled behavior? In other words given the following trivial example, does the code for x and y end up being the same, or does x box the passed value and then unbox it?
void Test(int% x, int& y)
{
x++;
y++;
}
void SomeFunction()
{
int x = 0;
int y = 1;
Test(x, y);
}
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Seems like x would automatically get boxed. You can run ildasm on the compiled binary and see if this is the case.
I could've sworn Nish had an article on & and % but I can't find it right now.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
hi friends,
i am infront of you with another doubt. We are using cin and cout in C++. Whether these are class or object.
if they are object how can we use them without declaring that it belongs to this class. Thanks for u in advance.
Shamnar
shamnar
|
|
|
|
|
cin is a class...
well how do you percept a difference between class and object?
|
|
|
|
|
NrmMyth wrote: cin is a class
no, cin is an instance of a class (std::ofstream class).
the difference between a class and an object is that a class defines a type, while an object is an instance of that class (an instance of the type of the class)
|
|
|
|
|
my bad, weren't thinking
also, i never used word "object" for "instance", personal opinion
|
|
|
|
|
well, i not only don't understand what you mean, but for the second time, i tell you that you ask about UNMANAGED C++, in a Managed C++ forum... this is the wrong place !
BTW, see my reply to the other guy to get some infos. the point is that cout and cin are instanciated at the beginning of your program (implicitely)
|
|
|
|
|
cin and cout aren't class or object. They are both functions.
we can use them without declaring because they have been declared in iostream.h
-- modified at 2:53 Sunday 13th August, 2006
-- modified at 2:55 Sunday 13th August, 2006
I love this web
|
|
|
|
|
Hi everyone!
I am creating menuitems on the main menu during run time from user instructions but i am stuck on creating eventhandlers for them at the same time.
I've tried specifying the eventhandler in the constructor like this
System::Windows::Forms::MenuItem * Item = new
System::Windows::Forms::MenuItem(S"subItem1",new
EventHandler(this,Item_Click));
(saw an example on the internet) but get
error C2065: 'Item_Click' : undeclared identifier
error C3350: 'System::EventHandler' : a delegate constructor expects two arguments
Any help is much appreciated
george
george
|
|
|
|
|
Is there a way to have SPLASH WINDOW in VC++ .NET as in MFC ?
if not, any possible workaround ?
Cheers
Pavan
|
|
|
|
|
|
|
Hi Experts,
As i am a beginer in C++ i met with a confusion. I would like to know where the actual defention of library function is present. For eg: the defention of strlen(). Is it present in string.h. Or just the declaration only present in the string.h. please clrify my doubts.
Thanking you
Shamnar
shamnar
|
|
|
|
|
strlen() is defined in the C runtime. it is not a function you should use in C++/CLI.
|
|
|
|
|
I think you can't find the definition because they are compiled into library files.
|
|
|
|
|
thnks to both of u for spending your valuable time to reply a simple question like this.
Shamnar
shamnar
|
|
|
|
|
Hello all,
How to get the size of reference type stucture,
ref Innerstruct<br />
{<br />
unsigned int j;<br />
bool bl;<br />
};<br />
ref stuct sample<br />
{<br />
int i;<br />
Byte b;<br />
Innerstruct st;<br />
};<br />
<br />
sample s=gcnew sample;<br />
int length=sizeof(s);
this returns 4, i thing it is the size of pointer. how to get the orginal size of structure and its members
|
|
|
|
|
Hi everyone!
I have an Access table made up of various "ingredients". From this table by selecting various "ingredients" i want to create another table (or just create new entries in another table) of "recipe" names and store this table in the same or another Access file.
I am connecting to the ingredients table and filling a dataset with it, through a DataAdapter, then i'm displaying the contents in a DataGrid in which i've added a CheckBox column. I'm planning to use this checkbox column to select the ingredients for the various recipes.
I know i can link such tables by using a column in the ingredients table which will specify a recipe name for each ingredient. However my problem is that some of the recipes will share the same ingredients so i can't use such a column to create the relationship.
Any ideas on the way to tackle this problem?
Thanks in advance.
george
|
|
|
|