|
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
|
|
|
|
|
Hi everyone,
I think i posted this one in the wrong Forum, so i posted it in the SQL/ADO/ADO.NET forum and got my answer thanks to ToddHileHoffer.
Will use three tables, one for the "recipes", one for the "ingredients" and one for the "recipeingredients" and the relation will be between the recipes table and the recipeingredients table. Just in case anyone else was wandering.
: )
cheeriooooo!
george
george
|
|
|
|
|
i want to typecast System::Byte* to class type pointer
__gc class Update
{public:
unsigned short Posn;
short Pres;
short Temp1;
short Temp2;
Byte status;
};
Byte *data;
i am receieving data from one function
i want to typecast this Byte pointer to Update class pointer type.
how it is possible in managed c++
|
|
|
|
|
Hi,
I am not an expert, but I think the code below or a similar code should match:
Update* upd = new Update();
upd->Posn = data[0] + 256*data[1];
upd->Pres = data[2] + 256*data[3];
upd->Temp1= data[4] + 256*data[5];
upd->Temp2= data[6] + 256*data[7];
upd->status=data[8];
This is a simple way to do your cast by hand.
Thanks,
HZ
|
|
|
|
|
Create a copy constructor
|
|
|
|
|
but sir __gc class shall not declare a user-defined copy constructor,How to possible to create copy constructor
|
|
|
|
|
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
|
|
|
|