Hi,
In my Service.h I have:
#include "Configuration.h"
and in my class:
private:
ConfigurationInterface* configuration_;
Then, in my Service.cpp:
Service::Service(Foundation::Framework* framework) :
framework_(framework)
{
configuration_ = new Configuration();
}
and later...
const Info GetInfo()
{
retur...
1>cb.c(51): error C2061: syntax error : identifier 'SaveConfiguration'
1>cb.c(51): error C2059: syntax error : ';'
1>cb.c(51): error C2059: syntax error : 'type'
1>cb.c(52): error C2061: syntax error : identifier 'LoadConfiguration'
1>cb.c(52): error C2059: syntax error : ';'
1>cb.c(52): error C2059: syntax error : 'type'
1>cb.c(122): er...
I am reading Beginning C# to refresh my memory on C# (background in C++).
I came across this snippet in the book:
int i;
string text;
for (i = 0; i < 10; i++)
{
text = "Line " + Convert.ToString(i);
Console.WriteLine("{0}", text);
}
Console.WriteLine("Last text output in loop: {0}", text);
The snippet above will not compile - b...
i have a search view controller like below.
@interface SearchViewController : {
TopicRulesViewController *TViewController;
}
i want to move to another view.but i am getting this "error: expected specifier-qualifier-list before 'TopicRulesViewController'"
what is that error?
thanks in advance
...
I tried a naive class taken from a book I found in the office.
This is it:
#include <iostream.h>
#include <math.h>
const double ANG_RAD = 0.017;
class Angulo {
double valor;
public:
void act_valor( double );
double seno( void );
double coseno( void );
double tangente( void );
} grado;
void Angulo::act_valor( double a ) {
...
I have a C++ class that requires a function pointer in it's constructor (float(*myfunction)(vector<float>*))
I've already exposed some function pointers to Python.
The ideal way to use this class is something like this:
import mymodule
mymodule.some_class(mymodule.some_function)
So I tell Boost about this class like so:
class_<Some...
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Color;
import java.util.Random;
public class dots {
public dots() {
init();
}
public void init() {
JFrame frame = new JFrame("Dots");
frame.setExtendedState(Frame.MAXIMIZED_BOTH);
...
Hi,
I have the following classes/traits in Scala
trait Write[-T] {
def add(elem : T);
}
class ContraListWrapper[T] (var list : List[T]) extends Write[T] {
def add(elem : T) = {
list = elem :: list
}
}
def bar(list : Write[Number]) = {}
Invoking the method with a List of Object or list of Numbers works, thanks to contr...
I am using an aggregate initializer to set up a block of static data for a unit test.
I would like to use the array size as the expected number of elements, but this can fail if too few initializers are provided:
my_struct_type expected[14] =
{
{ 1.234, 0, 'c' },
{ 3.141, 1, 'z' },
{ 2.718, 0, 'a' }
};
This gives no compi...
I've been going through a textbook to learn fortran 90. At the moment I'm learning about dummy arguments and local variables in functions.
One of the exercises is to write a program which asks the user for their first name and last name, then joins the names together and prints the full name. Here's the code:
PROGRAM name_test
IMPL...
I am trying to compile "Loch" without any success on my Mac OSX 10.6. I always get some "symbol(s) not found when compiling" error. Anyone an idea what could be the problem?
Thanks a lot
c++ -o loch -Wall getline.o lxTR.o lxOGLFT.o lxSetup.o lxRender.o lxWX.o lxImgIO.o lxLRUD.o lxFile.o lxSTree.o lxData.o lxMath.o lxSView.o lxSScene.o ...
If I have a class A with only a copy constructor and a constructor with parameters int and int, and I place that class inside a class B:
class B
{
public:
B();
private
A a;
}
How would I initialize a inside B's constructor?
I've tried a(0, 0), a = A(0, 0), but not surprisingly neither worked, and I receive a
error: no match...
I'd like my students to be able to run the compiler from within gedit and when there are errors, have a keyboard shortcut to jump directly to the source code containing the next error. I know how to do this in emacs (M-x compile followed by C-x `). Does anyone know how to set up something similar in gedit?
...
Trying to follow this tutorial, under the section "Initializing the Project Factory" I've added EnvDTE to my project, but now I get this error:
An assembly with the same identity 'EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
Eve...
While running a simple c program I receive an
Unresolved inclusion: <conio.h>
What am I missing? I am using eclipse on fedora 13. Please help me resolve this problem. If I am missing any file or haven't installed anything let me know. Also I am new to fedora. Guide me with proper steps please.
Thanks in advance.
...
I am attempting to compile wxWidgets 2.8.11 on Windows 7 x64 for use with Code::Blocks, and I keep running into the same error.
I have MinGW installed as stated, and the proper things added to the path (c:\mingw\bin and c:\mingw\mingw32\bin).
I followed the instructions given here: http://wiki.codeblocks.org/index.php?title=Compiling_w...
Hello! My source code in Visual C++ Express 2008 is as follows :
#include “stdafx.h”
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
std::cout << “Hello world!\n”;
return 0;
}
I'm using the book, Visual C++ 2008,by Ivor Horton
.These are the errors that I'm encountering.How do I get rid of the errors ?
1>e:\my documen...
template<typename T1, typename T2>
class Bimap {
public:
class Data;
typedef Data* DataP;
typedef std::multimap<T1, DataP> T1Map;
typedef std::multimap<T2, DataP> T2Map;
class Data {
private:
Bimap& bimap;
T1Map::iterator it1;
/*...*/
};
};
This gives me this compile error:
erro...
Hi
Why does this not compile? Cant see the error
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char *c;
FILE *f = fopen("file.txt", "r");
if(f == NULL) {
printf("Could not open file");
}
while((c = fgetc(f)) != EOF) {
if(strcmp(c, " ") == 0) {
printf(" ");...
I'm a student and just started learning C++ last week so this question is probably very low level but I can't figure it out.
I've searched around a bit but can't find any results, or maybe I'm looking for the wrong thing.
There are two cin parts. One taking in an int outside the loop, the other taking in a string inside the loop.
I'm ...