supongo que en la direccion es la falla
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCitarcd 'C:\Users\SM\Documents\NetBeansProjects\Automata'
C:\cygwin64\bin\make.exe -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/automata.exe
make[2]: Entering directory '/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata'
mkdir -p dist/Debug/Cygwin-Windows
g++ -o dist/Debug/Cygwin-Windows/automata build/Debug/Cygwin-Windows/Cadena.o build/Debug/Cygwin-Windows/main.o
build/Debug/Cygwin-Windows/main.o: In function `main':
/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata/main.cpp:28: undefined reference to `Cadena::fragmentar(std::string)'
/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata/main.cpp:28:(.text+0x72): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `Cadena::fragmentar(std::string)'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:63: recipe for target 'dist/Debug/Cygwin-Windows/automata.exe' failed
make[2]: *** [dist/Debug/Cygwin-Windows/automata.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata'
nbproject/Makefile-Debug.mk:60: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/SM/Documents/NetBeansProjects/Automata'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
#ifndef CADENA_H
#define CADENA_H
#include <string>
using namespace std;
class Cadena {
public:
Cadena();
string fragmentar(string );
Cadena(const Cadena& orig);
virtual ~Cadena();
private:
};
#endif /* CADENA_H */#include "Cadena.h";
#include <vector>;
# include <iostream>
using namespace std;
Cadena::Cadena() {
}
Cadena::Cadena(const Cadena& orig) {
}
Cadena::~Cadena() {
}
string fragmentar(string texto ){
int posicion=0;
string delimitador=" ";
vector<string> resultado;
while( ( posicion = texto.find( delimitador ) ) != string::npos ) {
resultado.push_back( texto.substr( 0, posicion ));
texto.erase( 0, posicion + delimitador.length());
}
for(int i=0; i<resultado.size(); i++){
}
return "hola";
}
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include "Cadena.h"
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
std::cout<<"si funciona";
Cadena cadena;
string var="comeGalleta";
string rs=cadena.fragmentar(var);
return 0;
}