tagged [compiler-errors]
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<AnonymousType#1>' to 'System.Collections.Generic.List<string>
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.List I have the code below: But what about ``` List aa = (from char c1 in source from ch...
- Modified
- 1 Aug at 10:30
Why can't I declare an enum inheriting from Byte but I can from byte?
Why can't I declare an enum inheriting from Byte but I can from byte? If I declare an enum like this ... ... it's working. If I declare an enum like this ... ... it's not working. The compiler throw :...
- Modified
- 15 Feb at 15:6
Operator '??' cannot be applied to operands of type 'T' and 'T'
Operator '??' cannot be applied to operands of type 'T' and 'T' I have the following generic method, but VS gives me a compile error on that. (Operator '??' cannot be applied to operands of type 'T' a...
- Modified
- 18 Jun at 22:32
What does "collect2: error: ld returned 1 exit status" mean?
What does "collect2: error: ld returned 1 exit status" mean? I see the error very often. For example, I was executing the following snippet of code: ``` void main() { char i; printf("ENTER i"); sca...
- Modified
- 22 Jan at 01:57
C# Error: Parent does not contain a constructor that takes 0 arguments
C# Error: Parent does not contain a constructor that takes 0 arguments My code is I am getting the error: > Parent does not contain a constructor that takes 0 arguments. I understa
- Modified
- 2 Jun at 17:59
what does "error : a nonstatic member reference must be relative to a specific object" mean?
what does "error : a nonstatic member reference must be relative to a specific object" mean? ``` int CPMSifDlg::EncodeAndSend(char *firstName, char *lastName, char *roomNumber, char *userId, char *use...
- Modified
- 10 Apr at 12:24
What is the difference between warning codes cs0618 and cs0612
What is the difference between warning codes cs0618 and cs0612 I have seen both of the following warning codes being thrown for utilization of code marked obsolete. [cs0618](http://msdn.microsoft.com...
- Modified
- 27 Apr at 23:23
cc1plus: error: unrecognized command line option "-std=c++11" with g++
cc1plus: error: unrecognized command line option "-std=c++11" with g++ I'm trying to compile using `g++` and either the `-std=c++11` or `c++0x` flags. However, I get this error ``` g++ (GCC) 4.1.2 200...
- Modified
- 4 Jun at 18:20
ServiceStack: Error calling service
ServiceStack: Error calling service I have implemented the a ServiceStack sample service, just like in the documentation - github.com/ServiceStack/ServiceStack/wiki/Create-your-first-webservice The pr...
- Modified
- 12 May at 00:25
Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll'
Cannot resolve Assembly or Windows Metadata file 'System.Configuration.dll' I am trying to compile a small test build (written in C#) in Visual Studio. However, I get two errors when trying so and can...
- Modified
- 23 May at 10:17
X11/Xlib.h not found in Ubuntu
X11/Xlib.h not found in Ubuntu I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says: > Compile thumb : egl
- Modified
- 8 Jun at 01:28
c++ compile error: ISO C++ forbids comparison between pointer and integer
c++ compile error: ISO C++ forbids comparison between pointer and integer I am trying an example from Bjarne Stroustrup's C++ book, third edition. While implementing a rather simple function, I get th...
- Modified
- 9 Mar at 00:51
Compiler error "Default parameter specifiers are not permitted"
Compiler error "Default parameter specifiers are not permitted" Below is my code. ``` public class PItem { public String content; public int count; public int fee; public int amount; public ...
- Modified
- 15 Jan at 10:50
Cast null value to a type
Cast null value to a type If we cast some null variable to a type, I expect the compiler to throw some exception, but it doesn't. Why? I mean maybe in the first one, the `as` operator handles the exce...
- Modified
- 3 Feb at 00:28
Cannot assign void to an implicitly-typed local variable
Cannot assign void to an implicitly-typed local variable ``` var query = rep.GetIp() // in this line i have the error .Where(x => x.CITY == CITY) .GroupBy(y => o.Fam) .Select(z => new I...
- Modified
- 30 Oct at 19:28
How do I concatenate multiple C++ strings on one line?
How do I concatenate multiple C++ strings on one line? C# has a syntax feature where you can concatenate many data types together on 1 line. What would be the equivalent in C++? As far as I can see, y...
- Modified
- 1 Dec at 07:54
Duplicate AssemblyVersion Attribute
Duplicate AssemblyVersion Attribute I have a project that generates following error on compilation: > error CS0579: Duplicate 'AssemblyVersion' attribute I have checked the file `AssemblyInfo.cs` and ...
- Modified
- 29 Oct at 12:36
Why is ;; allowed after a local variable declaration, but not after a field declaration?
Why is ;; allowed after a local variable declaration, but not after a field declaration? I saw this weird behaviour and I wonder if there's a reasonable explanation for this: When I put by ( by accide...
- Modified
- 23 Dec at 01:18
Could not load file or assembly ... The parameter is incorrect
Could not load file or assembly ... The parameter is incorrect Recently I met the following exception at C# solution: > Error 2 Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Cul...
- Modified
- 25 Nov at 12:51
"Non-static method cannot be referenced from a static context" error
"Non-static method cannot be referenced from a static context" error I have a class named `Media` which has a method named `setLoanItem`: I am trying to call this method from a class named `GUI` in th...
- Modified
- 4 May at 11:32
Why can I pass 1 as a short, but not the int variable i?
Why can I pass 1 as a short, but not the int variable i? Why does the first and second Write work but not the last? Is there a way I can allow all 3 of them and detect if it was 1, (int)1 or i passed ...
- Modified
- 6 Jun at 10:39
Use Include() method in repository
Use Include() method in repository I have the following with EF 5: This works. Then I tried to replicate this in my generic repository: But in this case I am not
- Modified
- 12 Dec at 02:6
Compiler Error: "error CS0307: The variable 'int' cannot be used with type arguments"
Compiler Error: "error CS0307: The variable 'int' cannot be used with type arguments" If I have the following code: I get a compile-time error on the call to `Check(int, int)`: > error CS0307: The var...
- Modified
- 23 Sep at 22:17
Static class declaring a protected member
Static class declaring a protected member I'm reading the book ["C# Language"](https://rads.stackoverflow.com/amzn/click/com/0321741765), and hit this note from Vladimir Reshetnikov: > If a static cla...
- Modified
- 15 Feb at 16:6
error: expected primary-expression before ')' token (C)
error: expected primary-expression before ')' token (C) I am trying to call a function named `characterSelection(SDL_Surface *screen, struct SelectionneNonSelectionne sel)` which returns a `void` This...
- Modified
- 27 Jul at 15:55