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. Declaring vs Initializing a variable? - Stack Overflow

    Jul 30, 2015 · The only difference is that the 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 …

  3. Java: define terms initialization, declaration and assignment

    Here i can be "initialized" from two possible locations, by simple assignments. Because of that, if i was an array, you can't use the special array initializer shorthand syntax with this construct. So basically …

  4. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · The third way of initializing is useful when you declare an array first and then initialize it, pass an array as a function argument, or return an array. The explicit type is required.

  5. 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.

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

    Here, the notification client is declared globally. I could have it initialized in file2.py, under add_some_tasks, but it would get initialized every time a request arrives, and that would require …

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

    Is this the way to declare and initialize a local variable of MY_TYPE in accordance with C programming language standards (C89, C90, C99, C11, etc.)? Or is there anything better or at least working? …

  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. How do I initialize weights in PyTorch? - Stack Overflow

    Mar 22, 2018 · How do I initialize weights and biases of a network (via e.g. He or Xavier initialization)?

  10. How to initialize a "static const" data member in C++?

    Oct 22, 2023 · Is it possible to initialize a static const data member outside of the constructor? Can it be initialized at the same place where data member is declared? class A { private: static const int a = ...