I understand the troubles you can get into when you put a using declaration inside a header file, so I don't want to do that. Instead I tried to put the using (or a namespace foo =) within the class declaration, to cut down on repetitive typing within the header file. Unfortunately I get compiler errors. Seems like it would be a usefu...
Hello,
I have a project that has to be set to "Objective-C++" for the "compile source as" value (no, "according to file type" will not work in my main project). I am having a problem with a file I got from a framework (specifically OpenFeint) that has compile errors when compiled as "Objective-C++".
error: pointer of type 'void *' used...
Hi,
I'm trying to compile a C program using GTK+ in bloodshed Dev-C++ 4.9.9.2.
I've added all the include files in the compiler options plus all compiler options, but I get the following error:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Projects\Makefile....
void main()
{
void *v;
int integer=2;
int *i=&integer;
v=i;
printf("%d",(int*)*v);
}
this simple program will result in a compiler error saying:
Compiler Error. We cannot apply indirection on type void*
what exact does this error mean?
...
Hello,
What does it mean?
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Any sugestions how to avoid that kind of errors?
...
I have the following class hierarchy:
template <typename T>
class base
{
public:
void f() {}
};
class class_a : public base<class_a> {};
class class_b : public base<class_b>,
public class_a
{
using base<class_b>::f;
};
int main()
{
class_b b;
b.f();
return 0;
}
Comeu and Intel C++ v11 claim all is...
This code:
#include <boost/signals.hpp>
#include <boost/bind.hpp>
#include <boost/mem_fn.hpp>
#include <iostream>
class Recorder : public ::boost::signals::trackable {
public:
void signalled() {
const void *me = this;
::std::cerr << "Recorder at " << me << " signalled!\n";
}
};
void signalled()
{
::std::cerr << "...
Hi,
I was provided this simple C++ [I think] program to investigate the maximum size of int that can be stored:
#include <limits.h>
#include <iostream>
void main ( int argc , char * argv[])
{
cout << "INT_MAX " << INT_MAX << endl ;
cout << "INT_MAX +1 = " << INT_MAX + 1 << endl ;
cout << "INT_MAX -1 = " << INT_MAX - 1 ...
I'm trying to compile this C++ program which utilizes the GLUT32 libraries.
Right now I'm getting the following errors:
Error 1 error LNK2001: unresolved
external symbol
_gluPerspective@32 Camera.obj soundCube
Error 2 error LNK2001: unresolved
external symbol
_gluLookAt@72 Camera.obj soundCube Error 3 error LNK2...
I am trying to declare a callback routine in C++ as follows:
void register_rename (int (*function) (const char *current, const char *new));
/*------------------------------------------------------------*/
/* WHEN: The callback is called once each time a file is received and
* accepted. (Renames the temporary file to it...
Every once in a while, when I'm editing an aspx or ascx page, Visual Studio will start telling me there is an error on the first line of my file. For instance, right now, it is saying Argument missing on line 1. That line is just your typical header, with no apparent problems (to my eyes), and I hadn't even changed that one when the erro...
I want to use atomic API, and I include . I don't know how to use it! Thank you!
...
If I have a script that builds eggs, basically by running
python setup.py bdist_egg --exclude-source-files
for a number of setup.py files that use setuptools to define how eggs are built, is there an easy way to determine if there were any errors in building the egg?
A situation I had recently, was that there was a syntax error in a ...
Everytime I do "Build & Go" the app to my device, It installs the app with a white icon, shows a black screen and "Failed to load NSMainNibFile MainWindow" in the debugger.
However after cleaning, and then recompiling it works fine. Is this normal? How do I go about this?
...
In the unit test of a class, I try to declare a class variable by calling explicitly the empty constructor and pass it to a function that excepts a reference to the interface of the type I'm declaring, but the compiler produces error. When I just declare it without any explicit constructor call the function accepts it.
See the code bel...
I have a (com) c++ project, which uses a (.net) c++ dll. The project was compiling and running ok.
Now, all I did was make changes to the dll, and I'm getting a fatal error c1083- cannot open include file stdafx.h - when recompiling my (com) project.
What can this mean?
...
I was happily working in C++, until compilation time arrived.
I've got several classes inside some namespace (let's call it N); two of these classes correspond to one base class, and other derived from it. Each class has its own pair of .hpp and .cpp files; I think it'd look like:
namespace N{
class Base{
};
class Derived...
I am trying an example from Bjarne Stroustrup's C++ book, third edition. While implementing a rather simple function, I get the following compile time error:
error: ISO C++ forbids comparison between pointer and integer
What could be causing this? Here is the code. The error is in the if line:
#include <iostream>
#include <string>
us...
Hello,
I would like to write a linux block device driver. The driver would not need to access the hardware so it can be in userspace.
To start, I have tried to build an example block device driver with this Makefile:
obj-m = sbd.o
KVERSION = $(shell pwd)
PWD = $(shell pwd)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modu...
I encountered a strange compiler error in Delphi Prism 2010 that I am unable to resolve. The error is calling a method on an object defined in a third-party assembly that manipulates a specialized image format. The assembly itself was compiled against the .Net 2.0 Runtime.
Despite providing the correct list of parameters, I consistently...