Instantiation Programming Software Development by james6754 Is it good practice to do all instantiation inside the Main() method and not in any other classes? Re: Instantiation Programming Software Development by ddanbe I would do instantiation when it is needed, be it in the Main method or not. instantiation; and arrays & structures really objects? Programming Software Development by BobLewiston … understand as clearly as possible some issues pertaining to the instantiation of objects. Firstly, have I correctly analyzed the functions and… user-defined data type, an array itself is never an instantiation of a user-defined data type (I think). Furthermore, like… Instantiation of class objects Programming Software Development by AlanZinober This refers to instantiation and "uninstantiation". I need to solve an ode … Re: Instantiation of class objects Programming Software Development by AlanZinober … this problem?" I need to "destroy" the instantiation somehow. Alan [code=cplusplus] Output out(1000); Output out1(1000… Re: Instantiation Programming Software Development by james6754 Thats what I thought...but I was told the other day to use the Main() method as the driver of the program...and instantiate in Main(); Re: Instantiation Programming Software Development by ddanbe Main() is just what is called the entrypoint of your program. It is there where the first instructions of your program will be executed. Re: Explicit template instantiation Programming Software Development by vijayan121 …;> why would I use "[B]explicit template instantiation[/B]" ? there are two valid reasons: a.… with a number of templated types, automatic template instantiation in multiuple translation units can increase build times.… specializations in a single location and inhibiting the instantiation in all other translation units can mitigate this.… Explicit template instantiation Programming Software Development by amt_muk …, Can you pls tell me about "[B]explicit template instantiation[/B]". Suppose I have a simple program : 1. …lt;endl; return 0; } [/code] This is an implicit template instantiation. Now pls tell how and why I can use "…;[B]explicit template instantiation[/B]" in the above example. Thanx, Amit Re: C++ Template Instantiation Programming Software Development by kinslayer_e Yes, that's ok, if I put the instantiation in the .CPP it compiles ok. What I don't understand is why that code (with the instantiation in de .H) works under Windows / MinGW and don't in Linux / GCC. (By the way, the teacher told me that I MUST put the instantiation in the .H and I don't want to explain him that that is WRONG =P ). C++ Template Instantiation Programming Software Development by kinslayer_e …] As you can see, I'm trying to use explicit instantiation of the template in the header file, but when I… GCC. In Ubuntu, it works if I put the template instantiation on the end of the Temp.cpp file. I know… Invalid member variable values after object instantiation. Programming Software Development by gsfare … everyone. I am experienceing some rather strange behaviour regarding the instantiation of an object. It's a templated custom array type….size() - 1 ); return( tempArray ); } [/CODE] Now to my problem. After instantiation of the object tempArray it's member variables array_ and… Re: C++ Template Instantiation Programming Software Development by StuXYZ Basically your template instantiation is in the wrong piece of code. It should be … GUI Type Scope and Instantiation Programming Software Development by n00b3 … my included data types. The compiler does not like 'global' instantiation. What is going on here? Thanks, Cross thread instantiation in WPF Programming Software Development by swinefish … see anyway to use the dispatcher for the sake of instantiation. Is there anybody who could give me a little push… unresolved function overloading, instantiation problem Programming Software Development by cppgangster … overloaded function template, but I get some kind of an instantiation problem and here is my code: [CODE] /* * File: main.cpp… Re: unresolved function overloading, instantiation problem Programming Software Development by mike_2000_17 … advance using the <>. That is called "explicit instantiation" of the template. But, as I said before, you… Confusion on what actually happens during instantiation? Programming Software Development by zachattack05 … anyone else? If the load event is not triggered at instantiation wouldn't the event name be kind of deceiving? I… Application Instantiation Error Programming Web Development by LONGWAY when i try to call my joomla with localhost i get this: [b]Error displaying the error page: Application Instantiation Error[/b] my db name, my user and pass are correct, i dont see any problem in configuration page, they r correct Re: instantiation; and arrays & structures really objects? Programming Software Development by Rashakil Fol What is your definition of "object"? Things are what things are. In .NET 2.0, arrays, in particular, are essentially full-blooded objects in the way that List<T>s are full-blooded objects. They have some weird constructor syntax (with initializer lists and [icode]new string[n][/icode] syntax) but they are the same kind of thing.… Re: instantiation; and arrays & structures really objects? Programming Software Development by ddanbe To start with the first issue : [QUOTE](Am I not correct that a handle is simply an address?)[/QUOTE] A handle is as far as I know an address to an address or if you like a pointer to a pointer. Re: instantiation; and arrays & structures really objects? Programming Software Development by Rashakil Fol [QUOTE=ddanbe;784364]A handle is as far as I know an address to an address or if you like a pointer to a pointer.[/QUOTE] What are you talking about. Re: instantiation; and arrays & structures really objects? Programming Software Development by ddanbe [QUOTE=Rashakil Fol]What are you talking about. [/QUOTE] Give me your definition of a "handle". Re: instantiation; and arrays & structures really objects? Programming Software Development by Rashakil Fol I don't know of any such notion as "handle". Now here's the rest of my reply to the original poster: I think things are best made clear here by defining the relationships between things completely, so here are the definitions I follow: A [i]type[/i] can either be a [i]reference type[/i] or a [i]value type[/i]. A [i]class[/i] is a … Re: instantiation; and arrays & structures really objects? Programming Software Development by Rashakil Fol Since that's a terrible code example, I better put the good version or else some noob will come along and copy and paste the bad version. [code]public class Memo<T> { T cached = default(T); Func<T> memoizee; public Memo<T>(Func<T> memoizee) { this.memoizee = memoizee; } public T Get() { … Re: instantiation; and arrays & structures really objects? Programming Software Development by ddanbe Glad to hear that you have no such notion as "handle". It is one of the reasons wich pointed me to C#. Only val and ref. Nice. Further I am amazed by the way you formulate your answers. I don't know how you can do it in such short time. Besides your knowledge it must be because english is your native tongue, I think. Re: instantiation; and arrays & structures really objects? Programming Software Development by BobLewiston attention, Rashakil Fol: Too much good stuff there for me to digest at the moment - I'll study it. Thanks. Re: instantiation; and arrays & structures really objects? Programming Software Development by BobLewiston [QUOTE]...note that the type T[] is treated under C#'s system no differently than other reference types. For example, the constraint "X : class" where X is some type is satisfied by T[]:[/QUOTE] [CODE]public class Memo<T> { T cached = default(T); Func<T> memoizee; public Memo<T>(Func<T> memoizee)… Re: instantiation; and arrays & structures really objects? Programming Software Development by Rashakil Fol Suppose you have some function to get the maximum element of an array: [code] public static T Max<T>(T accum, T[] array) { foreach (T elem in array) accum = accum.CompareTo(elem) < 0 ? elem : accum; return accum; }[/code] This function won't compile. The reason is that there's no guarantee that the type T has a … Re: Instantiation of class objects Programming Software Development by Ancient Dragon Its hard to say why that code isn't working, since we have no idea what Output and Ode are -- resumeably c++ classes. That would normally not be a problem.