About 50 results
Open links in new tab
  1. What is the difference between "instantiated" and "initialized"?

    Feb 25, 2010 · To initialize means assigning an initial state to the object before it is used. This initialization can be part of the instantiation process, in that case values are explicitly assigned to …

  2. How can I initialize all members of an array to the same value?

    How would you use memset to initialize a int array to some value larger than 255? memset only works if the array is byte sized.

  3. How to initialize a struct in accordance with C programming language ...

    } An important thing to remember: at the moment you initialize even one object/variable in the struct, all of its other variables will be initialized to default value. If you don't initialize the values in your struct …

  4. java - Difference between initializing a class and instantiating an ...

    Feb 25, 2013 · I tried searching for this question through the search engine but could find a topic that explained the difference between initializing a class and instantiating an object. Could someone …

  5. How to directly initialize a HashMap (in a literal way)?

    How to directly initialize a HashMap (in a literal way)? Asked 14 years, 8 months ago Modified 9 months ago Viewed 2.2m times

  6. How to initialize a global object or variable and reuse it in every ...

    How to initialize a global object or variable and reuse it in every FastAPI endpoint? Asked 2 years, 10 months ago Modified 9 months ago Viewed 33k times

  7. Declaring vs Initializing a variable? - Stack Overflow

    Jul 30, 2015 · The only difference is that the var statement will initialize any declared variables without a value to undefined. In both examples, you are declaring a variable. If you assign a value to a variable …

  8. c++ - A value of type "const char*" cannot be used to initialize an ...

    Feb 13, 2018 · A const pointer to non-const char would be a char* const, and you can initialize a char* from that all day if you want. You can, if you really want, achieve this with const_cast<char*>(p), and …

  9. c# - Initialize () vs Constructor () method, proper usage on object ...

    Oct 13, 2014 · A constructor should initialize an object in a way that it's in a usable state. A constructor should only initialize an object, not perform heavy work. A constructor should not directly or indirectly …

  10. Use of Initializers vs Constructors in Java - Stack Overflow

    Apr 30, 2009 · Even if all constructors for a class share a large amount of code, the use of a private initialize () function seems to make more sense to me than using an initializer because it doesn't lock …