Building target: Lab1
Invoking: MacOS X C++ Linker
g++ -o "Lab1" ./src/EclipseR.o ./src/EclipseR_test.o ./src/Row.o ./src/Rows.o
Undefined symbols for architecture x86_64:
"Row::AddColumn(int, std::__1::basic_string, std::__1::allocator >)", referenced from:
_main in EclipseR.o
Row.h
#fndef ROW_H_
#define ROW_H_
#include <iostream>
using namespace std;
Class Row {
public:
Row();
Row(std::string id);
string id;
string columns[24]
void AddColumn(int index, std::string value);
};
#endif
Row.cpp
#include "Row.h"
#include <iostream>
#include <string>
using namespace std;
string columns[24];
Row::Row(){
// TODO
}
Row::Row(string id) {
this->id = id;
cout << "ID: " << this->id;
}
Row::~Row()
{
//Deconstructor
}
void AddColumn(int index, std::string value)
{
columns[index] = value;
}
string columns[24];
in Row.cpp. Perhaps you added this in an attempt to get the file to compile... – aschepler