compiler-errors

Why does this C++ code fail?

I have the following code #include <iostream> #include <vector> using namespace std; int distance(vector<int>& set1, vector<int>& set2) { int distance = 0; unsigned int i1 = 0; unsigned int i2 = 0; while(i1 < set1.size() && i2 < set2.size()) { if(set1[i1] == set2[i2]) { ++i1; ++i2; } else {...

How can my visual studio addin detect compiler errors before building in the same manner as "Remove and Sort Usings"?

I'm making a refactoring tool that automates a few of the more trivial code styling things dealing with StyleCop. One of the things I'd like my add-in to be able to do (as an optional feature the developer can turn on/off) is automatically call the "Organize Usings -> Remove and Sort" functionality. This is a simple macro call. Howeve...

error in nvcc using emulation mode

The error I get is this "C:\CUDA\bin\nvcc.exe" -arch sm_10 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -deviceemu -D_DEVICEEMU -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"C:\CUDA\include" -I"../../common/inc" -maxrregcount=32 --compile -o "Debug\matrixMul.cu.obj" "c:\Documents and Settings\All Users.SYSROOT...

Expression Expected

Im getting a build error with the following code... Private Property GridViewSortDirection() As String Get Return If(TryCast(ViewState("SortDirection"), String), "ASC") End Get Set(ByVal value As String) ViewState("SortDirection") = value End Set End Property It is happening on the following line... ...

Forward declaration of 'const struct list::SingleList' , Invalid use of incomplete type 'list::SingleList' (Compilation errors)

SingleList.h #include "ListBase.h" #include "DataNode.h" #include "SingleListIterator.h" namespace list { class SingleListIterator; class SingleList : public ListBase { private: DataNode *head; DataNode *tail; public: SingleList(); SingleList(const SingleList &...

iPhone: Linker Errors with External Files

I've added some files to my project. The sample code runs elsewhere but when I build my project it returns the errors below. Building target "test" of project "test" with configuration "Debug" - (31 errors) Linking /Users/kshan/Desktop/test/build/Debug-iphonesimulator/test.app/test (31 errors) "___gmpn_sub_n", referenced from:...

boost::bind & std::set::count compile error

Hi, Could anybody point me, please, what the difference is between making functor of set::insert and set::count in the below fragment? typedef std::set<std::string> s_type; typedef std::pair<s_type::iterator, bool>(s_type::*insert_fp)(const s_type::value_type&); typedef s_type::size_type(s_type::*count_fp)(const s_type::value_type&); ...

Visual Studio registry capture utility has stopped working, error compiling C# project in Windows7

Windows 7 Shows build error like below everytime I compile my project. ...

Compile time error plugins for Php

I know that php is a scripting language like perl.python. But, is there a eclipse plugin which gives a error when a function taht is called doesn't exists. Or when a variable which is defined in the doesn't exists. There are too many careless mistakes that are happening with me in a huge project. I miss java for this. Any compile tim...

"unable to open stdio.h in turbo c"

whenever i compile my program i get the error above,plz give some solution. ...

New Error in Strongly-Typed View - Cannot Enumerate Model?

I am currently using ASP.NET MVC 2.0 RC2, having recently moved from version 1.0. I have noticed that some of my views no longer work. I have views that inherit from a strongly-typed IEnumerable, like this: Inherits="System.Web.Mvc.ViewPage<IEnumerable<MyProject.Models.MyType>>" In the past, I have enumerated the model in my view li...

Why does the Java compiler complain about a local variable not having been initialized here?

int a = 1, b; if(a > 0) b = 1; if(a <= 0) b = 2; System.out.println(b); If I run this, I receive: Exception in thread "main" java.lang.Error: Unresolved compilation problem: The local variable b may not have been initialized at Broom.main(Broom.java:9) I know that the local variables are not initialized and is your duty to do t...

va_list has not been declared

When compiling some working code on Fedora 11, I am getting this error: /usr/include/c++/4.4.1/cstdarg:56: error: ‘::va_list’ has not been declared I am using: [doriad@davedesktop VTK]$ g++ --version g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2) Does anyone know what the problem could be? Thanks, Dave ...

Java "XXX is already defined in main" error

here is the program: (the file name is date.java) class date { public static void main (String[] args) { int day, hour, minute; String firstline, half; firstline="the current imaginary time is:"; day=24; hour=5; minute=36; String half; half="PM" ; System.out.println ("here is some program abou...

Actionscript VerifyError: The ABC data is corrupt, attempt to read out of bounds.

Getting a VerifyError using the TweenMax lib when calling TweenMax.to. This error doesn't seem to be specific to TweenMax (we've found other people having errors with unrelated code). Perhaps someone has some insight into what this error means and what could be causing it. Edit Seems like it's something to do with Anonymous functions: ...

AS3: How to force parameters in callback functions

Hello, I am currently doing something like this: myFunc(tracer); function tracer(message:String):void{ trace(message); } function myFunc(callback:Function):void{ callback("Hello"); } Now, this works fine. But how can the function myFunc know, if the given callback function accepts the correct number and type of arguments in its si...

C# .NET: Is it possible to create compile time warnings when property is set to invalid values?

This is just a feasibility question. I know that if I say int myInt = "5"; I get a compile time error. What I want to do is create compile time errors or warnings on objects. So let's say I have a custom object with a few properties. One of the properties cannot be null otherwise the solution will not compile: public stati...

Custom Output => List of Errors interpretation in VS2008 IDE.

Hello, I have a "database solution" project in VS2008 - it generates SQL for more than one DB vendor from some sort of templates. In order to save time, I also have a tool in VS2008 configured (a Python script), which can compile an individual stored procedure. Now, with the Python script I have the freedom of processing the output and h...

Thrust (CUDA Library) Compile error like "'vectorize_from_shared_kernel__entry' : is not a member of 'thrust::detail::device::cuda'"

I create a VS project using CUDA VS Wizard, and I try to build a cuda program using Thrust, the test program is quite simple: // ignore headers int main(void) { thrust::device_vector<double> X; X.resize(100); } I will got some compile error like: 1>C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/tmpxft_00003cc0_00000000-3_sample.cudafe1.stub.c(2...

C++: has not been declared error

Hi folks, I'm trying to implement a linked list but get a intSLLst.cpp:38: error: ‘intSLList’ has not been declared error when compiling. intSLList looks like it's been declared to me though so I'm really confused. intSLLst.cpp #include <iostream> #include "intSLLst.h" int intSLList::deleteFromHead(){ } int main(){ } intSLLst....