tagged [declaration]
error: member access into incomplete type : forward declaration of
error: member access into incomplete type : forward declaration of I have two classes in the same .cpp file: The forward does not work, I cannot compile. I get this error: ``` error: member access int...
- Modified
- 7 Aug at 18:33
Declare and assign multiple string variables at the same time
Declare and assign multiple string variables at the same time I'm declaring some strings that are empty, so it won't throw errors later on. I've read that this was the proper way: ``` string Camnr = K...
- Modified
- 4 Feb at 03:15
How to declare variable and use it in the same Oracle SQL script?
How to declare variable and use it in the same Oracle SQL script? I want to write reusable code and need to declare some variables at the beginning and reuse them in the script, such as: How can I dec...
- Modified
- 19 Feb at 13:36
Any problem declaring a variable and using TryParse to initialize it on same line?
Any problem declaring a variable and using TryParse to initialize it on same line? This example is in C# but I expect could apply to others just as easily. I recently found that the following seems to...
- Modified
- 30 Dec at 20:54
How can I unset a JavaScript variable?
How can I unset a JavaScript variable? I have a global variable in JavaScript (actually a `window` property, but I don't think it matters) which was already populated by a previous script, but I don't...
- Modified
- 24 Jul at 17:20
Declare variable in Razor
Declare variable in Razor I want to add a variable outside the foreach and then use that inside the foreach loop ``` Date Location @int i; @foreach (var item in Model) { i=0; ...
- Modified
- 18 Dec at 09:44
How to prevent XDocument from adding XML version and encoding information
How to prevent XDocument from adding XML version and encoding information Despite using the SaveOptions.DisableFormatting option in the following code: ``` XDocument xmlDoc = XDocument.Load(FileManage...
- Modified
- 21 May at 23:44
C# suffix behind numeric literal
C# suffix behind numeric literal I am new to C# and want to understand how values work. If I look at a normal integer value, it has 3 important parts in it: the type, name and value. But when I see a ...
- Modified
- 7 Jan at 05:22
Why are declarations necessary
Why are declarations necessary I am currently teaching a colleague .Net and he asked me a question that stumped me. Why do we have to declare? if var is implicit typing, why do we have to even declare...
- Modified
- 17 May at 10:18
Declaring variables inside loops, good practice or bad practice?
Declaring variables inside loops, good practice or bad practice? Is declaring a variable inside a loop a good practice or bad practice? I've read the other threads about whether or not there is a perf...
- Modified
- 9 Jan at 22:19
Meaning of - <?xml version="1.0" encoding="utf-8"?>
Meaning of - I am new to XML and I am trying to understand the basics. I read the line below in "Learning XML", but it is still not clear, for me. Can someone point me to a book or website which expla...
- Modified
- 20 Nov at 19:40
More elegant way of declaring multiple variables at the same time
More elegant way of declaring multiple variables at the same time To declare multiple variables at the "same time" I would do: But if I had to declare much more variables, it turns less and less elega...
- Modified
- 18 Jun at 17:3
Is it possible only to declare a variable without assigning any value in Python?
Is it possible only to declare a variable without assigning any value in Python? Is it possible to declare a variable in Python, like so?: so that it initialized to None? It seems like Python allows t...
- Modified
- 28 Jun at 21:13
VB.NET equivalent for the C# 7 is operator declaration pattern
VB.NET equivalent for the C# 7 is operator declaration pattern Is there a VB.NET equivalent to the [C# 7 is operator declaration pattern](https://learn.microsoft.com/en-us/dotnet/csharp/language-refer...
- Modified
- 12 May at 13:3
In C#, What is <T> After a Method Declaration?
In C#, What is After a Method Declaration? I'm a VB.Net guy. (because I have to be, because the person who signs my check says so. :P) I grew up in Java and I don't generally struggle to read or write...
- Modified
- 30 Apr at 15:52
Assign values of array to separate variables in one line
Assign values of array to separate variables in one line Can I assign each value in an array to separate variables in one line in C#? Here's an example in Ruby code of what I want: I'm not sure if wha...
- Modified
- 1 May at 17:44
Forward declaring an enum in C++
Forward declaring an enum in C++ I'm trying to do something like the following: which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it", but I can't...
- Modified
- 12 Nov at 22:57
Missing partial modifier on declaration ..another partial declaration of this type exists". I'm a beginner and just following the book
Missing partial modifier on declaration ..another partial declaration of this type exists". I'm a beginner and just following the book I'm a beginner and I'm doing an exercise following a book. Below ...
- Modified
- 29 Jul at 12:42
Cannot refer to a non-final variable inside an inner class defined in a different method
Cannot refer to a non-final variable inside an inner class defined in a different method Edited: I need to change the values of several variables as they run several times thorugh a timer. I need to k...
- Modified
- 20 Jun at 09:12
C++ class forward declaration
C++ class forward declaration When I try to compile this code, I get: ``` 52 C:\Dev-Cpp\Projektyyy\strategy\Tiles.h invalid use of undefined type `struct tile_tree_apple' 46 C:\Dev-Cpp\Projektyyy\stra...
- Modified
- 14 Dec at 11:44
Define a global variable in a JavaScript function
Define a global variable in a JavaScript function Is it possible to define a global variable in a JavaScript function? I want use the `trailimage` variable (declared in the `makeObj` function) in othe...
- Modified
- 6 Jan at 21:38
Component is part of the declaration of 2 modules
Component is part of the declaration of 2 modules I try to build an ionic 2 app. When I try the app in the browser with ionic serve or launch it on an emulator everything works fine. But when I try to...
- Modified
- 30 Apr at 18:31
Can variables declared inside a for loop affect the performance of the loop?
Can variables declared inside a for loop affect the performance of the loop? I have done my homework and found repeated assurances that it makes no difference in performance whether you declare your v...
- Modified
- 9 Feb at 18:30
TypeLoadException when using PCL in .NET application if called class contains [OnDeserialized] method
TypeLoadException when using PCL in .NET application if called class contains [OnDeserialized] method I am adapting an existing .NET class library to a Portable Class Library. I am using profile 78 (....
- Modified
- 20 Dec at 18:47