About 50 results
Open links in new tab
  1. c++ - What is the difference between const int*, const int * const, and ...

    Jul 17, 2009 · Exception, a starting const applies to what follows. 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 …

  2. How to declare a constant in Java? - Stack Overflow

    Oct 9, 2012 · We always write: public static final int A = 0; Question: Is static final the only way to declare a constant in a class? If I write public final int A = 0; instead, is A still a constant or...

  3. What is the difference between constant variables and final variables ...

    May 30, 2015 · Please help me understand the difference between constant variables and final variables in Java. I am a bit confused with it.

  4. Is there a way to make a TSQL variable constant?

    DECLARE @Constant INT = 123; SELECT * FROM [some_relation] WHERE [some_attribute] = @Constant OPTION( OPTIMIZE FOR (@Constant = 123)) This tells the query compiler to treat the …

  5. Java constant examples (Create a java file having only constants)

    What is the best practice to declare a java file having only constant? public interface DeclareConstants { String constant = "Test"; } OR public abstract class DeclareConstants { public s...

  6. c++ - error C2059: syntax error : 'constant' - Stack Overflow

    May 9, 2012 · The error reported is error C2059: syntax error : 'constant' (followed by error C2258: illegal pure syntax, must be '= 0' and error C4430: missing type specifier - int assumed.

  7. Verilog/SystemVerilog: "constant" function is considered non-constant

    Dec 2, 2023 · In my case, i always call the function with localparams, which are constant. However as i am using a for loop and the carry variable changes, it is considered non-constant.

  8. c++ - Multi-character constant warnings - Stack Overflow

    Oct 13, 2011 · Why is this a warning? I think there are many cases when is more clear to use multi-char int constants instead of "no meaning" numbers or instead of defining const variables with same …

  9. How to define a constant globally in C# (like DEBUG)

    Jan 12, 2009 · But when I go to another file in the same project, this constant is not defined. Can I in some way define a constant to all the project, like DEBUG is defined so?

  10. Switch case in C# - a constant value is expected

    3 switch is very picky in the sense that the values in the switch must be a compile time constant. and also the value that's being compared must be a primitive (or string now). For this you should use an if …