About 21,400,000 results
Open links in new tab
  1. What is the difference between static const and const?

    Jul 14, 2018 · const int i=5; i value you can modify by using a pointer if i is defined and declared locally, if it is static const int a=5; or const int i=5; globally , you can not modify since it is …

  2. c++ - What is the difference between const int*, const int * const, …

    Jul 17, 2009 · const int* is the same as int const* and means "pointer to constant int". const int* const is the same as int const* const and means "constant pointer to constant int". Edit: For …

  3. What is a " const member function"? - Stack Overflow

    That is, it’s a constant pointer to a non-constant X (see Const Pointers and Pointers to Const [7, 21]). Because the object to which this refers is not const, it can be modified. The type of this in …

  4. Why can I change a constant object in JavaScript?

    The value of a constant cannot change through re-assignment, and a constant cannot be re-declared. Because of this, although it is possible to declare a constant without initializing it, it …

  5. Why don't C++ compilers do better constant folding?

    Aug 31, 2018 · @Rakete1111 Presumably because nobody sat down to write detailed enough rules/model by which the compiler would track constant propagation through vector …

  6. c# - const vs. readonly - Stack Overflow

    Jul 4, 2012 · No offensive but I don't think runtime constant is a proper phrase. private readonly string foo = "bar"; creates a variable named "foo", whose value is "bar", and the value is …

  7. algorithm - What is meant by constant time? - Stack Overflow

    Jan 26, 2014 · When changing the input size for a constant-time algorithm, the runtime won't grow. For e.g. linear algorithms, when changing the input size, the runtime grows (linearly). …

  8. Why can't I have "public static const string S = "stuff"; in my Class?

    Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants... So using static in const fields is like trying to make a defined (with #define) static …

  9. c - Initializer element is not a constant - Stack Overflow

    Sep 15, 2016 · I have to assign a static variable a value which I am getting from a function. I tried doing the following but I am getting initializer element is not constant. int countValue() { return …

  10. java - String Constant Pool - Stack Overflow

    Jan 4, 2013 · Each time you create a string literal, the JVM checks the string constant pool first. If the string already exists in the pool, a reference to the pooled instance is returned. If string …