I don't understand where is error... It gives me: error: expected ')' before 'conf' when I build...
This is generic.cpp file.
#include <stdio.h>
#include "generic.h"
#include <string>
#include <iostream>
Generic(dynamic_reconfigure::Config conf ) //Costruttore
{
this->conf = conf;
}
int Generic::addInt(std::string name, int value)
{
dynamic_reconfigure::IntParameter int_param;
std::cout << "Insert an integer value of " << name << ":\n";
std::cin >> value;
std::cout << "Setting " << name << "\n\n";
std::cout << "Matched value: " << value << "\n\n";
int_param.name=name;
int_param.value=value;
this->conf.ints.push_back(int_param);
return value;
}
Here there is generic.h file:
#ifndef GENERIC_H_INCLUDED
#define GENERIC_H_INCLUDED
#include <string>
#include <dynamic_reconfigure/IntParameter.h>
#include <dynamic_reconfigure/Config.h>
class Generic{
dynamic_reconfigure::Config conf;
public:
Generic(dynamic_reconfigure::Config conf ); //Costruttore
int addInt(std::string name, int value);
};
#endif // GENERIC_H_INCLUDED
I also tried to put dynamic_reconfigure::Config conf as public but nothing. Can you help me?